]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lifetimes/borrowck-let-suggestion.rs
Merge commit 'e9d1a0a7b0b28dd422f1a790ccde532acafbf193' into sync_cg_clif-2022-08-24
[rust.git] / src / test / ui / lifetimes / borrowck-let-suggestion.rs
1 fn f() {
2     let mut x = vec![1].iter();
3     //~^ ERROR temporary value dropped while borrowed
4     x.use_mut();
5 }
6
7 fn main() {
8     f();
9 }
10
11 trait Fake { fn use_mut(&mut self) { } fn use_ref(&self) { }  }
12 impl<T> Fake for T { }