mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-17 16:31:32 +00:00
13 lines
226 B
Rust
13 lines
226 B
Rust
fn f() {
|
|
let mut x = vec![1].iter();
|
|
//~^ ERROR temporary value dropped while borrowed
|
|
x.use_mut();
|
|
}
|
|
|
|
fn main() {
|
|
f();
|
|
}
|
|
|
|
trait Fake { fn use_mut(&mut self) { } fn use_ref(&self) { } }
|
|
impl<T> Fake for T { }
|