1
Fork 0

Add a test for rustc_deprecated

This commit is contained in:
varkor 2019-02-11 12:16:50 +01:00
parent c8752415dc
commit b5fa870760
2 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,15 @@
// ignore-tidy-linelength
#![deny(deprecated_in_future)]
#![feature(staged_api)]
#![stable(feature = "rustc_deprecation-in-future-test", since = "1.0.0")]
#[rustc_deprecated(since = "99.99.99", reason = "effectively never")]
#[stable(feature = "rustc_deprecation-in-future-test", since = "1.0.0")]
pub struct S;
fn main() {
let _ = S; //~ ERROR use of item 'S' that will be deprecated in future version 99.99.99: effectively never
}

View file

@ -0,0 +1,14 @@
error: use of item 'S' that will be deprecated in future version 99.99.99: effectively never
--> $DIR/rustc_deprecation-in-future.rs:14:13
|
LL | let _ = S; //~ ERROR use of item 'S' that will be deprecated in future version 99.99.99: effectively never
| ^
|
note: lint level defined here
--> $DIR/rustc_deprecation-in-future.rs:3:9
|
LL | #![deny(deprecated_in_future)]
| ^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error