mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
20 lines
294 B
Rust
20 lines
294 B
Rust
//@ 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();
|
|
}
|