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
e53d6dd35bb38b81dff4b00497f4c152e9009499
rust/tests/ui/array-slice-vec/repeated-vector-syntax.rs

14 lines
213 B
Rust
Raw Normal View History

Add `// run-pass` annotations to all the tests under `ui/run-pass/`. (I may have accidentally added it to some auxilliary crates as well; my emacs-macro-based methodology was pretty crude.)
2018-08-30 14:18:55 +02:00
// run-pass
test: Fix tests.
2013-07-11 12:05:17 -07:00
pub fn main() {
Allow use of `[_ ; n]` syntax for fixed length and repeating arrays. This does NOT break any existing programs because the `[_, ..n]` syntax is also supported.
2014-12-20 15:20:51 +13:00
let x = [ [true]; 512 ];
Remove all `i` suffixes
2015-01-25 22:05:03 +01:00
let y = [ 0; 1 ];
Expand on cleanups in trans for expr_repeat and add to tests.
2013-03-25 15:46:10 -07:00
Remove libdebug and update tests.
2014-10-14 21:07:11 -04:00
print!("[");
Implement pretty-printing of `..` and update tests. Update tests to change all `&expr[]` to `&expr[..]` to make sure pretty printing passes.
2015-02-05 17:58:30 +01:00
for xi in &x[..] {
print!("{:?}, ", &xi[..]);
Remove libdebug and update tests.
2014-10-14 21:07:11 -04:00
}
println!("]");
Implement pretty-printing of `..` and update tests. Update tests to change all `&expr[]` to `&expr[..]` to make sure pretty printing passes.
2015-02-05 17:58:30 +01:00
println!("{:?}", &y[..]);
rustc: Translate repeated vector syntax
2012-08-03 18:48:17 -07:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 5055ms Template: 3ms
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