mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
23 lines
296 B
Rust
23 lines
296 B
Rust
struct Test;
|
|
|
|
struct Test2(Option<Test>);
|
|
|
|
impl Drop for Test {
|
|
fn drop(&mut self) {
|
|
println!("dropping!");
|
|
}
|
|
}
|
|
|
|
impl Drop for Test2 {
|
|
fn drop(&mut self) {}
|
|
}
|
|
|
|
fn stuff() {
|
|
let mut x : (Test2, Test2);
|
|
(x.0).0 = Some(Test); //~ ERROR E0381
|
|
}
|
|
|
|
fn main() {
|
|
stuff()
|
|
}
|