tests: Move run-pass tests without naming conflicts to ui
This commit is contained in:
parent
ca9faa52f5
commit
9be35f82c1
3226 changed files with 64 additions and 196 deletions
19
src/test/ui/for-loop-while/for-loop-into-iterator.rs
Normal file
19
src/test/ui/for-loop-while/for-loop-into-iterator.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// run-pass
|
||||
// Test that for loops can do what RFC #235 claims
|
||||
|
||||
|
||||
fn main() {
|
||||
let mut v = vec![1];
|
||||
|
||||
for x in &v {
|
||||
assert_eq!(x, &1);
|
||||
}
|
||||
|
||||
for x in &mut v {
|
||||
assert_eq!(x, &mut 1);
|
||||
}
|
||||
|
||||
for x in v {
|
||||
assert_eq!(x, 1);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue