From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- .../ui/deprecation/staged-deprecation-in-future.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/test/ui/deprecation/staged-deprecation-in-future.rs (limited to 'src/test/ui/deprecation/staged-deprecation-in-future.rs') diff --git a/src/test/ui/deprecation/staged-deprecation-in-future.rs b/src/test/ui/deprecation/staged-deprecation-in-future.rs new file mode 100644 index 000000000..87b15ec30 --- /dev/null +++ b/src/test/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 +} -- cgit v1.2.3