2012-09-08 15:50:29 -07:00
|
|
|
fn f1<T: copy>() -> T { }
|
|
|
|
//~^ ERROR obsolete syntax: lower-case kind bounds
|
|
|
|
|
|
|
|
fn f1<T: send>() -> T { }
|
|
|
|
//~^ ERROR obsolete syntax: lower-case kind bounds
|
|
|
|
|
|
|
|
fn f1<T: const>() -> T { }
|
|
|
|
//~^ ERROR obsolete syntax: lower-case kind bounds
|
|
|
|
|
|
|
|
fn f1<T: owned>() -> T { }
|
|
|
|
//~^ ERROR obsolete syntax: lower-case kind bounds
|
|
|
|
|
|
|
|
struct s {
|
|
|
|
let foo: (),
|
|
|
|
//~^ ERROR obsolete syntax: `let` in field declaration
|
|
|
|
bar: ();
|
|
|
|
//~^ ERROR obsolete syntax: field declaration terminated with semicolon
|
|
|
|
new() { }
|
|
|
|
//~^ ERROR obsolete syntax: struct constructor
|
|
|
|
}
|
|
|
|
|
2012-09-10 17:26:20 -07:00
|
|
|
struct ss {
|
|
|
|
fn foo() { }
|
|
|
|
//~^ ERROR obsolete syntax: class method
|
|
|
|
#[whatever]
|
|
|
|
fn foo() { }
|
|
|
|
//~^ ERROR obsolete syntax: class method
|
|
|
|
}
|
|
|
|
|
2012-09-10 18:00:03 -07:00
|
|
|
struct q : r {
|
|
|
|
//~^ ERROR obsolete syntax: class traits
|
|
|
|
}
|
|
|
|
|
2012-09-10 18:56:07 -07:00
|
|
|
struct sss {
|
|
|
|
priv {
|
|
|
|
//~^ ERROR obsolete syntax: private section
|
|
|
|
foo: ()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-09-08 15:50:29 -07:00
|
|
|
fn obsolete_with() {
|
|
|
|
struct S {
|
|
|
|
foo: (),
|
|
|
|
bar: (),
|
|
|
|
}
|
|
|
|
|
|
|
|
let a = S { foo: (), bar: () };
|
|
|
|
let b = S { foo: () with a };
|
|
|
|
//~^ ERROR obsolete syntax: with
|
|
|
|
let c = S { foo: (), with a };
|
|
|
|
//~^ ERROR obsolete syntax: with
|
|
|
|
let a = { foo: (), bar: () };
|
|
|
|
let b = { foo: () with a };
|
|
|
|
//~^ ERROR obsolete syntax: with
|
|
|
|
let c = { foo: (), with a };
|
|
|
|
//~^ ERROR obsolete syntax: with
|
|
|
|
}
|
|
|
|
|
2012-10-20 16:33:59 -07:00
|
|
|
fn obsolete_fixed_length_vec() {
|
|
|
|
let foo: [int]/1;
|
|
|
|
//~^ ERROR obsolete syntax: fixed-length vector
|
|
|
|
foo = [1]/_;
|
|
|
|
//~^ ERROR obsolete syntax: fixed-length vector
|
|
|
|
let foo: [int]/1;
|
|
|
|
//~^ ERROR obsolete syntax: fixed-length vector
|
|
|
|
foo = [1]/1;
|
|
|
|
//~^ ERROR obsolete syntax: fixed-length vector
|
|
|
|
}
|
|
|
|
|
2012-09-08 15:50:29 -07:00
|
|
|
fn main() { }
|