diff options
Diffstat (limited to 'tests/ui/deprecation/staged-deprecation-in-future.rs')
-rw-r--r-- | tests/ui/deprecation/staged-deprecation-in-future.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/deprecation/staged-deprecation-in-future.rs b/tests/ui/deprecation/staged-deprecation-in-future.rs new file mode 100644 index 000000000..87b15ec30 --- /dev/null +++ b/tests/ui/deprecation/staged-deprecation-in-future.rs @@ -0,0 +1,18 @@ +#![deny(deprecated_in_future)] + +#![feature(staged_api)] + +#![stable(feature = "rustc_deprecation-in-future-test", since = "1.0.0")] + +#[deprecated(since = "99.99.99", note = "effectively never")] +#[stable(feature = "rustc_deprecation-in-future-test", since = "1.0.0")] +pub struct S1; + +#[deprecated(since = "TBD", note = "literally never")] +#[stable(feature = "rustc_deprecation-in-future-test", since = "1.0.0")] +pub struct S2; + +fn main() { + let _ = S1; //~ ERROR use of unit struct `S1` that will be deprecated in future version 99.99.99: effectively never + let _ = S2; //~ ERROR use of unit struct `S2` that will be deprecated in a future Rust version: literally never +} |