rollup merge of #18679 : brson/lint-trait

This commit is contained in:
Alex Crichton 2014-11-06 13:32:11 -08:00
commit 90bfcec323
3 changed files with 72 additions and 27 deletions

View file

@ -118,6 +118,9 @@ pub trait Trait {
impl Trait for MethodTester {}
#[experimental]
pub trait ExperimentalTrait {}
#[deprecated]
pub struct DeprecatedStruct { pub i: int }
#[experimental]

View file

@ -141,6 +141,12 @@ mod cross_crate {
foo.trait_unmarked(); //~ ERROR use of unmarked item
foo.trait_stable();
}
struct S;
impl ExperimentalTrait for S { } //~ ERROR use of experimental item
trait LocalTrait : ExperimentalTrait { } //~ ERROR use of experimental item
}
mod inheritance {
@ -444,6 +450,15 @@ mod this_crate {
foo.trait_unmarked();
foo.trait_stable();
}
#[deprecated]
pub trait DeprecatedTrait {}
struct S;
impl DeprecatedTrait for S { } //~ ERROR use of deprecated item
trait LocalTrait : DeprecatedTrait { } //~ ERROR use of deprecated item
}
fn main() {}