]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lifetimes/borrowck-let-suggestion.rs
Rollup merge of #105555 - krasimirgg:llvm-int-opt-2, r=cuviper
[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 { }