summary refs log tree commit diff
path: root/src/test/compile-fail/copy-a-resource.rs
blob: 6eeb4ea2ed440c3646b1894bd08d40e5f48fe9cd (plain)
1
2
3
4
5
6
7
8
9
// error-pattern: copying a noncopyable value

class foo {
  let i: int;
  new(i:int) { self.i = i; }
  drop {}
}

fn main() { let x <- foo(10); let y = x; log(error, x); }