about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/ui/feature-gates/feature-gate-reborrow.rs3
-rw-r--r--tests/ui/feature-gates/feature-gate-reborrow.stderr13
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/feature-gates/feature-gate-reborrow.rs b/tests/ui/feature-gates/feature-gate-reborrow.rs
new file mode 100644
index 00000000000..f016f6c6bfa
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-reborrow.rs
@@ -0,0 +1,3 @@
+use std::marker::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
new file mode 100644
index 00000000000..5e3033f3bf1
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-reborrow.stderr
@@ -0,0 +1,13 @@
+error[E0658]: use of unstable library feature `reborrow`
+  --> $DIR/feature-gate-reborrow.rs:1:5
+   |
+LL | use std::marker::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
+   = 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`.