]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/stability-attribute/stability-attribute-sanity.rs
Allow `since="TBD"` for rustc_deprecated
[rust.git] / src / test / ui / stability-attribute / stability-attribute-sanity.rs
index 80d7ae6dc637d78723cdc17ab762f4d7945bc324..0c40f8ae1c67ea3b6a9c95df9d5f30196d9b2c41 100644 (file)
@@ -59,14 +59,18 @@ fn multiple3() { }
 
 #[stable(feature = "a", since = "b")]
 #[rustc_deprecated(since = "b", reason = "text")]
-#[rustc_deprecated(since = "b", reason = "text")]
+#[rustc_deprecated(since = "b", reason = "text")] //~ ERROR multiple deprecated attributes
 #[rustc_const_unstable(feature = "c", issue = "none")]
 #[rustc_const_unstable(feature = "d", issue = "none")] //~ ERROR multiple stability levels
-pub const fn multiple4() { } //~ ERROR multiple deprecated attributes
-//~^ ERROR Invalid stability or deprecation version found
+pub const fn multiple4() { }
+//~^ ERROR Invalid stability version found
+
+#[stable(feature = "a", since = "1.0.0")]
+#[rustc_deprecated(since = "invalid", reason = "text")]
+fn invalid_deprecation_version() {} //~ ERROR Invalid deprecation version found
 
 #[rustc_deprecated(since = "a", reason = "text")]
 fn deprecated_without_unstable_or_stable() { }
-//~^ ERROR rustc_deprecated attribute must be paired with either stable or unstable attribute
+//~^^ ERROR rustc_deprecated attribute must be paired with either stable or unstable attribute
 
 fn main() { }