Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
e4a0f997fb01b9cbb650532fea1278159faff064
rust/src/test/compile-fail/writing-through-uninit-vec.rs

5 lines
116 B
Rust
Raw Normal View History

Add test for writing-through-uninit bug (reported on IRC by jrmuizel), plus fix in typestate system.
2010-07-23 13:52:46 -07:00
// error-pattern: Unsatisfied precondition constraint
Convert most working tests to ivecs I tried to pay attention to what was actually being tested so, e.g. when I test was just using a vec as a boxed thing, I converted to boxed ints, etc. Haven't converted the macro tests yet. Not sure what to do there.
2011-08-12 15:42:39 -07:00
fn test() { let w: [int]; w.(5) = 0; }
Add test for writing-through-uninit bug (reported on IRC by jrmuizel), plus fix in typestate system.
2010-07-23 13:52:46 -07:00
Reformat for new syntax
2011-07-27 14:19:39 +02:00
fn main() { test(); }
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 686ms Template: 15ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API