]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/deprecated_annotation.rs
Merge commit '4c41a222ca5d1325fb4b6709395bd06e766cc042' into clippyup
[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 }