]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/deprecated_annotation.rs
Nest the `impl Trait` existential item inside the return type
[rust.git] / src / test / ui / impl-trait / deprecated_annotation.rs
1 // compile-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 }