]> git.lizzy.rs Git - rust.git/blob - src/test/ui/deprecation/rustc_deprecation-in-future.rs
Auto merge of #79895 - Kerollmops:slice-group-by, r=m-ou-se
[rust.git] / src / test / ui / deprecation / rustc_deprecation-in-future.rs
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 S1;
12
13 #[rustc_deprecated(since = "TBD", reason = "literally never")]
14 #[stable(feature = "rustc_deprecation-in-future-test", since = "1.0.0")]
15 pub struct S2;
16
17 fn main() {
18     let _ = S1; //~ ERROR use of unit struct `S1` that will be deprecated in future version 99.99.99: effectively never
19     let _ = S2; //~ ERROR use of unit struct `S2` that will be deprecated in a future Rust version: literally never
20 }