Skip to content

Commit b5fa870

Browse files
committed
Add a test for rustc_deprecated
1 parent c875241 commit b5fa870

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// ignore-tidy-linelength
2+
3+
#![deny(deprecated_in_future)]
4+
5+
#![feature(staged_api)]
6+
7+
#![stable(feature = "rustc_deprecation-in-future-test", since = "1.0.0")]
8+
9+
#[rustc_deprecated(since = "99.99.99", reason = "effectively never")]
10+
#[stable(feature = "rustc_deprecation-in-future-test", since = "1.0.0")]
11+
pub struct S;
12+
13+
fn main() {
14+
let _ = S; //~ ERROR use of item 'S' that will be deprecated in future version 99.99.99: effectively never
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error: use of item 'S' that will be deprecated in future version 99.99.99: effectively never
2+
--> $DIR/rustc_deprecation-in-future.rs:14:13
3+
|
4+
LL | let _ = S; //~ ERROR use of item 'S' that will be deprecated in future version 99.99.99: effectively never
5+
| ^
6+
|
7+
note: lint level defined here
8+
--> $DIR/rustc_deprecation-in-future.rs:3:9
9+
|
10+
LL | #![deny(deprecated_in_future)]
11+
| ^^^^^^^^^^^^^^^^^^^^
12+
13+
error: aborting due to previous error
14+

0 commit comments

Comments
 (0)