X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftest%2Fui%2Fdeprecation%2Fsuggestion.fixed;h=eba72f88a89115cefd1c018221477a124d41d7f4;hb=616ce3c5c029446ef8b0d7a3525f96b2e451840c;hp=1ba1821e6c18b1f8bf202f42b3745ba71a56f393;hpb=c79419af0721c614d050f09b95f076da09d37b0d;p=rust.git diff --git a/src/test/ui/deprecation/suggestion.fixed b/src/test/ui/deprecation/suggestion.fixed index 1ba1821e6c1..eba72f88a89 100644 --- a/src/test/ui/deprecation/suggestion.fixed +++ b/src/test/ui/deprecation/suggestion.fixed @@ -1,7 +1,9 @@ // run-rustfix #![feature(staged_api)] + #![stable(since = "1.0.0", feature = "test")] + #![deny(deprecated)] #![allow(dead_code)] @@ -19,21 +21,8 @@ impl Foo { fn replacement(&self) {} } -mod bar { - #[rustc_deprecated( - since = "1.0.0", - reason = "replaced by `replacement`", - suggestion = "replacement", - )] - #[stable(since = "1.0.0", feature = "test")] - pub fn deprecated() {} - - pub fn replacement() {} -} - fn main() { let foo = Foo; - foo.replacement(); //~ ERROR use of deprecated - bar::replacement(); //~ ERROR use of deprecated + foo.replacement(); //~ ERROR use of deprecated }