rollup merge of #18679 : brson/lint-trait
This commit is contained in:
commit
90bfcec323
3 changed files with 72 additions and 27 deletions
|
|
@ -118,6 +118,9 @@ pub trait Trait {
|
|||
|
||||
impl Trait for MethodTester {}
|
||||
|
||||
#[experimental]
|
||||
pub trait ExperimentalTrait {}
|
||||
|
||||
#[deprecated]
|
||||
pub struct DeprecatedStruct { pub i: int }
|
||||
#[experimental]
|
||||
|
|
|
|||
|
|
@ -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() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue