]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/borrow-for-loop-head.rs
Merge commit 'd0cf3481a84e3aa68c2f185c460e282af36ebc42' into clippyup
[rust.git] / src / test / ui / suggestions / borrow-for-loop-head.rs
1 fn main() {
2     let a = vec![1, 2, 3];
3     for i in &a {
4         for j in a {
5         //~^ ERROR cannot move out of `a` because it is borrowed
6         //~| ERROR use of moved value: `a`
7             println!("{} * {} = {}", i, j, i * j);
8         }
9     }
10 }