rust/tests/ui/impl-trait/deprecated_annotation.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
293 B
Rust
Raw Normal View History

// 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();
}