]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/deprecated_annotation.rs
Rollup merge of #95504 - jyn514:library-alias, r=Mark-Simulacrum
[rust.git] / src / test / ui / impl-trait / deprecated_annotation.rs
1 // build-pass (FIXME(62277): could be check-pass?)
2
3 #![deny(warnings)]
4
5 #[deprecated]
6 trait Deprecated {}
7
8 #[deprecated]
9 struct DeprecatedTy;
10
11 #[allow(deprecated)]
12 impl Deprecated for DeprecatedTy {}
13
14 #[allow(deprecated)]
15 fn foo() -> impl Deprecated { DeprecatedTy }
16
17 fn main() {
18     foo();
19 }