rust/src/test/ui/issues/issue-17337.rs
Andy Russell 0b32008642
report kind of deprecated item in message
This is important for fields, which are incorrectly referred to as
"items".
2020-07-26 13:58:31 -04:00

18 lines
345 B
Rust

#![feature(staged_api)]
#![deny(deprecated)]
#![unstable(feature = "unstable_test_feature", issue = "none")]
struct Foo;
impl Foo {
#[unstable(feature = "unstable_test_feature", issue = "none")]
#[rustc_deprecated(since = "1.0.0", reason = "text")]
fn foo(self) {}
}
fn main() {
Foo
.foo(); //~ ERROR use of deprecated
}