rust/tests/ui/unique-pinned-nocopy.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
210 B
Rust
Raw Normal View History

2015-01-28 13:34:18 +00:00
#[derive(Debug)]
struct R {
2013-07-02 19:47:32 +00:00
b: bool,
}
impl Drop for R {
2013-09-17 01:18:07 +00:00
fn drop(&mut self) {}
}
fn main() {
let i = Box::new(R { b: true });
let _j = i.clone(); //~ ERROR the method
println!("{:?}", i);
}