Add test case for deprecated attribute.
This commit is contained in:
parent
4b4c8331bb
commit
a0d7b96170
1 changed files with 10 additions and 0 deletions
10
src/test/compile-fail/lint-deprecated-items.rs
Normal file
10
src/test/compile-fail/lint-deprecated-items.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#[forbid(deprecated_item)];
|
||||
|
||||
type Bar = uint;
|
||||
|
||||
#[deprecated = "use Bar instead"]
|
||||
type Foo = int;
|
||||
|
||||
fn main() {
|
||||
let _x: Foo = 21;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue