summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/deprecated_annotation.rs
blob: f76724c8ab11daa2506377b2c631d2d7e3640f5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// build-pass (FIXME(62277): could be check-pass?)

#![deny(warnings)]

#[deprecated]
trait Deprecated {}

#[deprecated]
struct DeprecatedTy;

#[allow(deprecated)]
impl Deprecated for DeprecatedTy {}

#[allow(deprecated)]
fn foo() -> impl Deprecated { DeprecatedTy }

fn main() {
    foo();
}