summaryrefslogtreecommitdiffstats
path: root/src/test/ui/pin-macro
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/pin-macro')
-rw-r--r--src/test/ui/pin-macro/cant_access_internals.rs13
-rw-r--r--src/test/ui/pin-macro/cant_access_internals.stderr11
-rw-r--r--src/test/ui/pin-macro/lifetime_errors_on_promotion_misusage.rs29
-rw-r--r--src/test/ui/pin-macro/lifetime_errors_on_promotion_misusage.stderr31
4 files changed, 0 insertions, 84 deletions
diff --git a/src/test/ui/pin-macro/cant_access_internals.rs b/src/test/ui/pin-macro/cant_access_internals.rs
deleted file mode 100644
index 120d08894..000000000
--- a/src/test/ui/pin-macro/cant_access_internals.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// edition:2018
-#![feature(pin_macro)]
-
-use core::{
- marker::PhantomPinned,
- mem,
- pin::{pin, Pin},
-};
-
-fn main() {
- let mut phantom_pinned = pin!(PhantomPinned);
- mem::take(phantom_pinned.pointer); //~ ERROR use of unstable library feature 'unsafe_pin_internals'
-}
diff --git a/src/test/ui/pin-macro/cant_access_internals.stderr b/src/test/ui/pin-macro/cant_access_internals.stderr
deleted file mode 100644
index 060c9c48c..000000000
--- a/src/test/ui/pin-macro/cant_access_internals.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0658]: use of unstable library feature 'unsafe_pin_internals'
- --> $DIR/cant_access_internals.rs:12:15
- |
-LL | mem::take(phantom_pinned.pointer);
- | ^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: add `#![feature(unsafe_pin_internals)]` to the crate attributes to enable
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/pin-macro/lifetime_errors_on_promotion_misusage.rs b/src/test/ui/pin-macro/lifetime_errors_on_promotion_misusage.rs
deleted file mode 100644
index ca2b6cf75..000000000
--- a/src/test/ui/pin-macro/lifetime_errors_on_promotion_misusage.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-// edition:2018
-#![feature(pin_macro)]
-
-use core::{
- convert::identity,
- marker::PhantomPinned,
- mem::drop as stuff,
- pin::pin,
-};
-
-fn function_call_stops_borrow_extension() {
- let phantom_pinned = identity(pin!(PhantomPinned));
- //~^ ERROR temporary value dropped while borrowed
- stuff(phantom_pinned)
-}
-
-fn promotion_only_works_for_the_innermost_block() {
- let phantom_pinned = {
- let phantom_pinned = pin!(PhantomPinned);
- //~^ ERROR temporary value dropped while borrowed
- phantom_pinned
- };
- stuff(phantom_pinned)
-}
-
-fn main() {
- function_call_stops_borrow_extension();
- promotion_only_works_for_the_innermost_block();
-}
diff --git a/src/test/ui/pin-macro/lifetime_errors_on_promotion_misusage.stderr b/src/test/ui/pin-macro/lifetime_errors_on_promotion_misusage.stderr
deleted file mode 100644
index fc1be052f..000000000
--- a/src/test/ui/pin-macro/lifetime_errors_on_promotion_misusage.stderr
+++ /dev/null
@@ -1,31 +0,0 @@
-error[E0716]: temporary value dropped while borrowed
- --> $DIR/lifetime_errors_on_promotion_misusage.rs:12:35
- |
-LL | let phantom_pinned = identity(pin!(PhantomPinned));
- | ^^^^^^^^^^^^^^^^^^^ - temporary value is freed at the end of this statement
- | |
- | creates a temporary value which is freed while still in use
-LL |
-LL | stuff(phantom_pinned)
- | -------------- borrow later used here
- |
- = note: consider using a `let` binding to create a longer lived value
- = note: this error originates in the macro `pin` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0716]: temporary value dropped while borrowed
- --> $DIR/lifetime_errors_on_promotion_misusage.rs:19:30
- |
-LL | let phantom_pinned = {
- | -------------- borrow later stored here
-LL | let phantom_pinned = pin!(PhantomPinned);
- | ^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
-...
-LL | };
- | - temporary value is freed at the end of this statement
- |
- = note: consider using a `let` binding to create a longer lived value
- = note: this error originates in the macro `pin` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0716`.