about summary refs log tree commit diff
path: root/tests/ui/feature-gates
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/feature-gates')
-rw-r--r--tests/ui/feature-gates/feature-gate-doc_cfg.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-macro-attr.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.rs4
-rw-r--r--tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr4
-rw-r--r--tests/ui/feature-gates/feature-gate-reborrow-coerce-shared.rs3
-rw-r--r--tests/ui/feature-gates/feature-gate-reborrow-coerce-shared.stderr13
-rw-r--r--tests/ui/feature-gates/feature-gate-reborrow.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-reborrow.stderr4
-rw-r--r--tests/ui/feature-gates/feature-gate-sanitize.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-static_align-thread_local.rs11
10 files changed, 37 insertions, 10 deletions
diff --git a/tests/ui/feature-gates/feature-gate-doc_cfg.rs b/tests/ui/feature-gates/feature-gate-doc_cfg.rs
index b12b8a10571..213a5a8c5a9 100644
--- a/tests/ui/feature-gates/feature-gate-doc_cfg.rs
+++ b/tests/ui/feature-gates/feature-gate-doc_cfg.rs
@@ -1,2 +1,2 @@
-#[doc(cfg(unix))] //~ ERROR: `#[doc(cfg)]` is experimental
+#[doc(cfg(unix))] //~ ERROR
 fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-macro-attr.stderr b/tests/ui/feature-gates/feature-gate-macro-attr.stderr
index b58418527c5..75bc93e8027 100644
--- a/tests/ui/feature-gates/feature-gate-macro-attr.stderr
+++ b/tests/ui/feature-gates/feature-gate-macro-attr.stderr
@@ -4,7 +4,7 @@ error[E0658]: `macro_rules!` attributes are unstable
 LL | macro_rules! myattr { attr() {} => {} }
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: see issue #83527 <https://github.com/rust-lang/rust/issues/83527> for more information
+   = note: see issue #143547 <https://github.com/rust-lang/rust/issues/143547> for more information
    = help: add `#![feature(macro_attr)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
diff --git a/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.rs b/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.rs
index b4dc1fd4556..e37e405d1af 100644
--- a/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.rs
+++ b/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.rs
@@ -3,7 +3,7 @@ fn main() {
         //~^ ERROR non-exhaustive patterns: `usize::MAX..` not covered
         //~| NOTE pattern `usize::MAX..` not covered
         //~| NOTE the matched value is of type `usize`
-        //~| NOTE `usize` does not have a fixed maximum value
+        //~| NOTE `usize::MAX` is not treated as exhaustive, so half-open ranges are necessary to match exhaustively
         0..=usize::MAX => {}
     }
 
@@ -11,7 +11,7 @@ fn main() {
         //~^ ERROR non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
         //~| NOTE patterns `..isize::MIN` and `isize::MAX..` not covered
         //~| NOTE the matched value is of type `isize`
-        //~| NOTE `isize` does not have fixed minimum and maximum values
+        //~| NOTE `isize::MIN` and `isize::MAX` are not treated as exhaustive, so half-open ranges are necessary to match exhaustively
         isize::MIN..=isize::MAX => {}
     }
 }
diff --git a/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr b/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr
index c89dcaf727a..cfb00d6e741 100644
--- a/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr
+++ b/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr
@@ -5,7 +5,7 @@ LL |     match 0usize {
    |           ^^^^^^ pattern `usize::MAX..` not covered
    |
    = note: the matched value is of type `usize`
-   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
+   = note: `usize::MAX` is not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         0..=usize::MAX => {},
@@ -19,7 +19,7 @@ LL |     match 0isize {
    |           ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
    |
    = note: the matched value is of type `isize`
-   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
+   = note: `isize::MIN` and `isize::MAX` are not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL ~         isize::MIN..=isize::MAX => {},
diff --git a/tests/ui/feature-gates/feature-gate-reborrow-coerce-shared.rs b/tests/ui/feature-gates/feature-gate-reborrow-coerce-shared.rs
new file mode 100644
index 00000000000..c8ca4537089
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-reborrow-coerce-shared.rs
@@ -0,0 +1,3 @@
+use std::ops::CoerceShared; //~ ERROR  use of unstable library feature `reborrow`
+
+fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-reborrow-coerce-shared.stderr b/tests/ui/feature-gates/feature-gate-reborrow-coerce-shared.stderr
new file mode 100644
index 00000000000..dbbbcdf2fd5
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-reborrow-coerce-shared.stderr
@@ -0,0 +1,13 @@
+error[E0658]: use of unstable library feature `reborrow`
+  --> $DIR/feature-gate-reborrow-coerce-shared.rs:1:5
+   |
+LL | use std::ops::CoerceShared;
+   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #145612 <https://github.com/rust-lang/rust/issues/145612> for more information
+   = help: add `#![feature(reborrow)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-reborrow.rs b/tests/ui/feature-gates/feature-gate-reborrow.rs
index f016f6c6bfa..96eecfb28a1 100644
--- a/tests/ui/feature-gates/feature-gate-reborrow.rs
+++ b/tests/ui/feature-gates/feature-gate-reborrow.rs
@@ -1,3 +1,3 @@
-use std::marker::Reborrow; //~ ERROR  use of unstable library feature `reborrow`
+use std::ops::Reborrow; //~ ERROR  use of unstable library feature `reborrow`
 
 fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-reborrow.stderr b/tests/ui/feature-gates/feature-gate-reborrow.stderr
index 5e3033f3bf1..1224909f564 100644
--- a/tests/ui/feature-gates/feature-gate-reborrow.stderr
+++ b/tests/ui/feature-gates/feature-gate-reborrow.stderr
@@ -1,8 +1,8 @@
 error[E0658]: use of unstable library feature `reborrow`
   --> $DIR/feature-gate-reborrow.rs:1:5
    |
-LL | use std::marker::Reborrow;
-   |     ^^^^^^^^^^^^^^^^^^^^^
+LL | use std::ops::Reborrow;
+   |     ^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #145612 <https://github.com/rust-lang/rust/issues/145612> for more information
    = help: add `#![feature(reborrow)]` to the crate attributes to enable
diff --git a/tests/ui/feature-gates/feature-gate-sanitize.stderr b/tests/ui/feature-gates/feature-gate-sanitize.stderr
index 513999636a9..59e8b69de2e 100644
--- a/tests/ui/feature-gates/feature-gate-sanitize.stderr
+++ b/tests/ui/feature-gates/feature-gate-sanitize.stderr
@@ -4,7 +4,7 @@ error[E0557]: feature has been removed
 LL | #![feature(no_sanitize)]
    |            ^^^^^^^^^^^ feature has been removed
    |
-   = note: removed in CURRENT_RUSTC_VERSION; see <https://github.com/rust-lang/rust/pull/142681> for more information
+   = note: removed in 1.91.0; see <https://github.com/rust-lang/rust/pull/142681> for more information
    = note: renamed to sanitize(xyz = "on|off")
 
 error[E0658]: the `#[sanitize]` attribute is an experimental feature
diff --git a/tests/ui/feature-gates/feature-gate-static_align-thread_local.rs b/tests/ui/feature-gates/feature-gate-static_align-thread_local.rs
new file mode 100644
index 00000000000..29d4facffce
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-static_align-thread_local.rs
@@ -0,0 +1,11 @@
+// The feature gate error may be emitted twice, but only on certain targets
+//@ dont-require-annotations: ERROR
+//@ dont-check-compiler-stderr
+
+#![crate_type = "lib"]
+
+thread_local! {
+    //~^ ERROR the `#[rustc_align_static]` attribute is an experimental feature
+    #[rustc_align_static(16)]
+    static THREAD_LOCAL: u16 = 0;
+}