summaryrefslogtreecommitdiffstats
path: root/tests/ui/stability-attribute/stability-attribute-sanity.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /tests/ui/stability-attribute/stability-attribute-sanity.rs
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/stability-attribute/stability-attribute-sanity.rs')
-rw-r--r--tests/ui/stability-attribute/stability-attribute-sanity.rs33
1 files changed, 16 insertions, 17 deletions
diff --git a/tests/ui/stability-attribute/stability-attribute-sanity.rs b/tests/ui/stability-attribute/stability-attribute-sanity.rs
index cc30e6ab9..7857a0603 100644
--- a/tests/ui/stability-attribute/stability-attribute-sanity.rs
+++ b/tests/ui/stability-attribute/stability-attribute-sanity.rs
@@ -5,19 +5,19 @@
#![stable(feature = "rust1", since = "1.0.0")]
mod bogus_attribute_types_1 {
- #[stable(feature = "a", since = "b", reason)] //~ ERROR unknown meta item 'reason' [E0541]
+ #[stable(feature = "a", since = "4.4.4", reason)] //~ ERROR unknown meta item 'reason' [E0541]
fn f1() { }
#[stable(feature = "a", since)] //~ ERROR incorrect meta item [E0539]
fn f2() { }
- #[stable(feature, since = "a")] //~ ERROR incorrect meta item [E0539]
+ #[stable(feature, since = "3.3.3")] //~ ERROR incorrect meta item [E0539]
fn f3() { }
#[stable(feature = "a", since(b))] //~ ERROR incorrect meta item [E0539]
fn f5() { }
- #[stable(feature(b), since = "a")] //~ ERROR incorrect meta item [E0539]
+ #[stable(feature(b), since = "3.3.3")] //~ ERROR incorrect meta item [E0539]
fn f6() { }
}
@@ -28,7 +28,7 @@ mod missing_feature_names {
#[unstable(feature = "b")] //~ ERROR missing 'issue' [E0547]
fn f2() { }
- #[stable(since = "a")] //~ ERROR missing 'feature' [E0546]
+ #[stable(since = "3.3.3")] //~ ERROR missing 'feature' [E0546]
fn f3() { }
}
@@ -36,40 +36,39 @@ mod missing_version {
#[stable(feature = "a")] //~ ERROR missing 'since' [E0542]
fn f1() { }
- #[stable(feature = "a", since = "b")]
+ #[stable(feature = "a", since = "4.4.4")]
#[deprecated(note = "a")] //~ ERROR missing 'since' [E0542]
fn f2() { }
- #[stable(feature = "a", since = "b")]
- #[deprecated(since = "a")] //~ ERROR missing 'note' [E0543]
+ #[stable(feature = "a", since = "4.4.4")]
+ #[deprecated(since = "5.5.5")] //~ ERROR missing 'note' [E0543]
fn f3() { }
}
#[unstable(feature = "b", issue = "none")]
-#[stable(feature = "a", since = "b")] //~ ERROR multiple stability levels [E0544]
+#[stable(feature = "a", since = "4.4.4")] //~ ERROR multiple stability levels [E0544]
fn multiple1() { }
#[unstable(feature = "b", issue = "none")]
#[unstable(feature = "b", issue = "none")] //~ ERROR multiple stability levels [E0544]
fn multiple2() { }
-#[stable(feature = "a", since = "b")]
-#[stable(feature = "a", since = "b")] //~ ERROR multiple stability levels [E0544]
+#[stable(feature = "a", since = "4.4.4")]
+#[stable(feature = "a", since = "4.4.4")] //~ ERROR multiple stability levels [E0544]
fn multiple3() { }
-#[stable(feature = "a", since = "b")] //~ ERROR invalid stability version found
-#[deprecated(since = "b", note = "text")]
-#[deprecated(since = "b", note = "text")] //~ ERROR multiple `deprecated` attributes
+#[stable(feature = "e", since = "b")] //~ ERROR 'since' must be a Rust version number, such as "1.31.0"
+#[deprecated(since = "5.5.5", note = "text")]
+#[deprecated(since = "5.5.5", note = "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() { }
-#[stable(feature = "a", since = "1.0.0")] //~ ERROR invalid deprecation version found
-//~^ ERROR feature `a` is declared stable since 1.0.0
-#[deprecated(since = "invalid", note = "text")]
+#[stable(feature = "a", since = "1.0.0")] //~ ERROR feature `a` is declared stable since 1.0.0
+#[deprecated(since = "invalid", note = "text")] //~ ERROR 'since' must be a Rust version number, such as "1.31.0"
fn invalid_deprecation_version() {}
-#[deprecated(since = "a", note = "text")]
+#[deprecated(since = "5.5.5", note = "text")]
fn deprecated_without_unstable_or_stable() { }
//~^^ ERROR deprecated attribute must be paired with either stable or unstable attribute