Closed
Description
The following should emit a deprecation warning (feature(deprecated)
)
#![feature(deprecated)]
pub mod lib {
#[deprecated(note="don't use this")]
pub type Foo = String;
}
fn main() {
let t = ::lib::Foo::new(); // no warning
println!("{}", t);
}
Type aliases can emit warnings, like in the following example, but I think it should warn as the use site too (marked "no warning"):
#![feature(deprecated)]
pub mod lib {
#[deprecated(note="don't use this")]
pub type Foo = String;
}
use lib::Foo; // WARNING use of deprecated item
fn main() {
let s = Foo::new(); // no warning
println!("{}", s);
}