summaryrefslogtreecommitdiffstats
path: root/src/test/ui/stability-attribute/stability-attribute-sanity.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/stability-attribute/stability-attribute-sanity.rs
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/stability-attribute/stability-attribute-sanity.rs')
-rw-r--r--src/test/ui/stability-attribute/stability-attribute-sanity.rs76
1 files changed, 0 insertions, 76 deletions
diff --git a/src/test/ui/stability-attribute/stability-attribute-sanity.rs b/src/test/ui/stability-attribute/stability-attribute-sanity.rs
deleted file mode 100644
index cc30e6ab9..000000000
--- a/src/test/ui/stability-attribute/stability-attribute-sanity.rs
+++ /dev/null
@@ -1,76 +0,0 @@
-// Various checks that stability attributes are used correctly, per RFC 507
-
-#![feature(staged_api)]
-
-#![stable(feature = "rust1", since = "1.0.0")]
-
-mod bogus_attribute_types_1 {
- #[stable(feature = "a", since = "b", 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]
- fn f3() { }
-
- #[stable(feature = "a", since(b))] //~ ERROR incorrect meta item [E0539]
- fn f5() { }
-
- #[stable(feature(b), since = "a")] //~ ERROR incorrect meta item [E0539]
- fn f6() { }
-}
-
-mod missing_feature_names {
- #[unstable(issue = "none")] //~ ERROR missing 'feature' [E0546]
- fn f1() { }
-
- #[unstable(feature = "b")] //~ ERROR missing 'issue' [E0547]
- fn f2() { }
-
- #[stable(since = "a")] //~ ERROR missing 'feature' [E0546]
- fn f3() { }
-}
-
-mod missing_version {
- #[stable(feature = "a")] //~ ERROR missing 'since' [E0542]
- fn f1() { }
-
- #[stable(feature = "a", since = "b")]
- #[deprecated(note = "a")] //~ ERROR missing 'since' [E0542]
- fn f2() { }
-
- #[stable(feature = "a", since = "b")]
- #[deprecated(since = "a")] //~ ERROR missing 'note' [E0543]
- fn f3() { }
-}
-
-#[unstable(feature = "b", issue = "none")]
-#[stable(feature = "a", since = "b")] //~ 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]
-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
-#[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")]
-fn invalid_deprecation_version() {}
-
-#[deprecated(since = "a", note = "text")]
-fn deprecated_without_unstable_or_stable() { }
-//~^^ ERROR deprecated attribute must be paired with either stable or unstable attribute
-
-fn main() { }