]> git.lizzy.rs Git - rust.git/blob - tests/ui/deprecation/staged-deprecation-in-future.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / deprecation / staged-deprecation-in-future.rs
1 #![deny(deprecated_in_future)]
2
3 #![feature(staged_api)]
4
5 #![stable(feature = "rustc_deprecation-in-future-test", since = "1.0.0")]
6
7 #[deprecated(since = "99.99.99", note = "effectively never")]
8 #[stable(feature = "rustc_deprecation-in-future-test", since = "1.0.0")]
9 pub struct S1;
10
11 #[deprecated(since = "TBD", note = "literally never")]
12 #[stable(feature = "rustc_deprecation-in-future-test", since = "1.0.0")]
13 pub struct S2;
14
15 fn main() {
16     let _ = S1; //~ ERROR use of unit struct `S1` that will be deprecated in future version 99.99.99: effectively never
17     let _ = S2; //~ ERROR use of unit struct `S2` that will be deprecated in a future Rust version: literally never
18 }