2012-12-10 19:32:48 -06:00
|
|
|
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
2013-02-20 19:07:17 -06:00
|
|
|
fn f1<T:copy>() -> T { }
|
2012-09-08 17:50:29 -05:00
|
|
|
//~^ ERROR obsolete syntax: lower-case kind bounds
|
|
|
|
|
2013-02-20 19:07:17 -06:00
|
|
|
fn f1<T:send>() -> T { }
|
2012-09-08 17:50:29 -05:00
|
|
|
//~^ ERROR obsolete syntax: lower-case kind bounds
|
|
|
|
|
2013-02-20 19:07:17 -06:00
|
|
|
fn f1<T:const>() -> T { }
|
2012-09-08 17:50:29 -05:00
|
|
|
//~^ ERROR obsolete syntax: lower-case kind bounds
|
|
|
|
|
2013-02-20 19:07:17 -06:00
|
|
|
fn f1<T:owned>() -> T { }
|
2012-09-08 17:50:29 -05:00
|
|
|
//~^ 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 20:00:03 -05:00
|
|
|
struct q : r {
|
|
|
|
//~^ ERROR obsolete syntax: class traits
|
|
|
|
}
|
|
|
|
|
2012-09-10 20:56:07 -05:00
|
|
|
struct sss {
|
|
|
|
priv {
|
|
|
|
//~^ ERROR obsolete syntax: private section
|
|
|
|
foo: ()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-09-08 17:50:29 -05: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
|
|
|
|
}
|
|
|
|
|
2012-10-23 13:11:23 -05:00
|
|
|
fn obsolete_moves() {
|
|
|
|
let mut x = 0;
|
|
|
|
let y <- x;
|
|
|
|
//~^ ERROR obsolete syntax: initializer-by-move
|
2012-11-04 22:41:00 -06:00
|
|
|
y <- x;
|
2012-10-23 13:11:23 -05:00
|
|
|
//~^ ERROR obsolete syntax: binary move
|
|
|
|
}
|
|
|
|
|
2012-09-08 17:50:29 -05:00
|
|
|
fn main() { }
|