]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0597.rs
Add 'library/portable-simd/' from commit '1ce1c645cf27c4acdefe6ec8a11d1f0491954a99'
[rust.git] / src / test / ui / error-codes / E0597.rs
1 struct Foo<'a> {
2     x: Option<&'a u32>,
3 }
4
5 fn main() {
6     let mut x = Foo { x: None };
7     let y = 0;
8     x.x = Some(&y);
9     //~^ `y` does not live long enough [E0597]
10 }
11
12 impl<'a> Drop for Foo<'a> { fn drop(&mut self) { } }