]> git.lizzy.rs Git - rust.git/blob - tests/ui/copy-a-resource.rs
Rollup merge of #106570 - Xaeroxe:div-duration-tests, r=JohnTitor
[rust.git] / tests / ui / copy-a-resource.rs
1 #[derive(Debug)]
2 struct Foo {
3   i: isize,
4 }
5
6 impl Drop for Foo {
7     fn drop(&mut self) {}
8 }
9
10 fn foo(i:isize) -> Foo {
11     Foo {
12         i: i
13     }
14 }
15
16 fn main() {
17     let x = foo(10);
18     let _y = x.clone();
19     //~^ ERROR no method named `clone` found
20     println!("{:?}", x);
21 }