Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
19
tests/ui/for-loop-while/for-loop-into-iterator.rs
Normal file
19
tests/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