libsyntax: Remove "copy" pattern bindings from the language

This commit is contained in:
Patrick Walton 2013-06-10 19:42:28 -07:00 committed by Corey Richardson
parent 8cd40f9032
commit 3fcd4dca30
3 changed files with 11 additions and 6 deletions

View file

@ -10,11 +10,11 @@
extern mod extra;
fn o<T: Owned>(_: &T) {}
fn c<T: Const>(_: &T) {}
fn o<T: Send>(_: &T) {}
fn c<T: Freeze>(_: &T) {}
fn main() {
let x = extra::rc::rc_mut_from_owned(0);
o(&x); //~ ERROR instantiating a type parameter with an incompatible type `extra::rc::RcMut<int>`, which does not fulfill `Owned`
c(&x); //~ ERROR instantiating a type parameter with an incompatible type `extra::rc::RcMut<int>`, which does not fulfill `Const`
o(&x); //~ ERROR instantiating a type parameter with an incompatible type `extra::rc::RcMut<int>`, which does not fulfill `Send`
c(&x); //~ ERROR instantiating a type parameter with an incompatible type `extra::rc::RcMut<int>`, which does not fulfill `Freeze`
}