mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
15 lines
222 B
Rust
15 lines
222 B
Rust
struct C {
|
|
x: isize,
|
|
}
|
|
|
|
impl Drop for C {
|
|
fn drop(&mut self) {
|
|
println!("dropping: {}", self.x);
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
let c = C{ x: 2};
|
|
let _d = c.clone(); //~ ERROR no method named `clone` found
|
|
}
|