]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/deprecation/suggestion.fixed
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / deprecation / suggestion.fixed
index eba72f88a89115cefd1c018221477a124d41d7f4..7d662227881ace5d0af3631968b9f4b1d2627add 100644 (file)
@@ -21,8 +21,22 @@ 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
 }