diff options
Diffstat (limited to 'src/test/ui/not-panic')
-rw-r--r-- | src/test/ui/not-panic/not-panic-safe-2.rs | 13 | ||||
-rw-r--r-- | src/test/ui/not-panic/not-panic-safe-2.stderr | 34 | ||||
-rw-r--r-- | src/test/ui/not-panic/not-panic-safe-3.rs | 13 | ||||
-rw-r--r-- | src/test/ui/not-panic/not-panic-safe-3.stderr | 34 | ||||
-rw-r--r-- | src/test/ui/not-panic/not-panic-safe-4.rs | 12 | ||||
-rw-r--r-- | src/test/ui/not-panic/not-panic-safe-4.stderr | 34 | ||||
-rw-r--r-- | src/test/ui/not-panic/not-panic-safe-5.rs | 10 | ||||
-rw-r--r-- | src/test/ui/not-panic/not-panic-safe-5.stderr | 17 | ||||
-rw-r--r-- | src/test/ui/not-panic/not-panic-safe-6.rs | 12 | ||||
-rw-r--r-- | src/test/ui/not-panic/not-panic-safe-6.stderr | 34 | ||||
-rw-r--r-- | src/test/ui/not-panic/not-panic-safe.rs | 10 | ||||
-rw-r--r-- | src/test/ui/not-panic/not-panic-safe.stderr | 20 |
12 files changed, 0 insertions, 243 deletions
diff --git a/src/test/ui/not-panic/not-panic-safe-2.rs b/src/test/ui/not-panic/not-panic-safe-2.rs deleted file mode 100644 index f3faa7043..000000000 --- a/src/test/ui/not-panic/not-panic-safe-2.rs +++ /dev/null @@ -1,13 +0,0 @@ -#![allow(dead_code)] - -use std::panic::UnwindSafe; -use std::rc::Rc; -use std::cell::RefCell; - -fn assert<T: UnwindSafe + ?Sized>() {} - -fn main() { - assert::<Rc<RefCell<i32>>>(); - //~^ ERROR the type `UnsafeCell<i32>` may contain interior mutability and a - //~| ERROR the type `UnsafeCell<isize>` may contain interior mutability and a -} diff --git a/src/test/ui/not-panic/not-panic-safe-2.stderr b/src/test/ui/not-panic/not-panic-safe-2.stderr deleted file mode 100644 index 3b0f83b3b..000000000 --- a/src/test/ui/not-panic/not-panic-safe-2.stderr +++ /dev/null @@ -1,34 +0,0 @@ -error[E0277]: the type `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary - --> $DIR/not-panic-safe-2.rs:10:14 - | -LL | assert::<Rc<RefCell<i32>>>(); - | ^^^^^^^^^^^^^^^^ `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary - | - = help: within `RefCell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<i32>` - = note: required because it appears within the type `RefCell<i32>` - = note: required for `Rc<RefCell<i32>>` to implement `UnwindSafe` -note: required by a bound in `assert` - --> $DIR/not-panic-safe-2.rs:7:14 - | -LL | fn assert<T: UnwindSafe + ?Sized>() {} - | ^^^^^^^^^^ required by this bound in `assert` - -error[E0277]: the type `UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary - --> $DIR/not-panic-safe-2.rs:10:14 - | -LL | assert::<Rc<RefCell<i32>>>(); - | ^^^^^^^^^^^^^^^^ `UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary - | - = help: within `RefCell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<isize>` - = note: required because it appears within the type `Cell<isize>` - = note: required because it appears within the type `RefCell<i32>` - = note: required for `Rc<RefCell<i32>>` to implement `UnwindSafe` -note: required by a bound in `assert` - --> $DIR/not-panic-safe-2.rs:7:14 - | -LL | fn assert<T: UnwindSafe + ?Sized>() {} - | ^^^^^^^^^^ required by this bound in `assert` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/not-panic/not-panic-safe-3.rs b/src/test/ui/not-panic/not-panic-safe-3.rs deleted file mode 100644 index 21f0c0993..000000000 --- a/src/test/ui/not-panic/not-panic-safe-3.rs +++ /dev/null @@ -1,13 +0,0 @@ -#![allow(dead_code)] - -use std::panic::UnwindSafe; -use std::sync::Arc; -use std::cell::RefCell; - -fn assert<T: UnwindSafe + ?Sized>() {} - -fn main() { - assert::<Arc<RefCell<i32>>>(); - //~^ ERROR the type `UnsafeCell<i32>` may contain interior mutability and a - //~| ERROR the type `UnsafeCell<isize>` may contain interior mutability and a -} diff --git a/src/test/ui/not-panic/not-panic-safe-3.stderr b/src/test/ui/not-panic/not-panic-safe-3.stderr deleted file mode 100644 index 9e9a12764..000000000 --- a/src/test/ui/not-panic/not-panic-safe-3.stderr +++ /dev/null @@ -1,34 +0,0 @@ -error[E0277]: the type `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary - --> $DIR/not-panic-safe-3.rs:10:14 - | -LL | assert::<Arc<RefCell<i32>>>(); - | ^^^^^^^^^^^^^^^^^ `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary - | - = help: within `RefCell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<i32>` - = note: required because it appears within the type `RefCell<i32>` - = note: required for `Arc<RefCell<i32>>` to implement `UnwindSafe` -note: required by a bound in `assert` - --> $DIR/not-panic-safe-3.rs:7:14 - | -LL | fn assert<T: UnwindSafe + ?Sized>() {} - | ^^^^^^^^^^ required by this bound in `assert` - -error[E0277]: the type `UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary - --> $DIR/not-panic-safe-3.rs:10:14 - | -LL | assert::<Arc<RefCell<i32>>>(); - | ^^^^^^^^^^^^^^^^^ `UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary - | - = help: within `RefCell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<isize>` - = note: required because it appears within the type `Cell<isize>` - = note: required because it appears within the type `RefCell<i32>` - = note: required for `Arc<RefCell<i32>>` to implement `UnwindSafe` -note: required by a bound in `assert` - --> $DIR/not-panic-safe-3.rs:7:14 - | -LL | fn assert<T: UnwindSafe + ?Sized>() {} - | ^^^^^^^^^^ required by this bound in `assert` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/not-panic/not-panic-safe-4.rs b/src/test/ui/not-panic/not-panic-safe-4.rs deleted file mode 100644 index ba93af5c0..000000000 --- a/src/test/ui/not-panic/not-panic-safe-4.rs +++ /dev/null @@ -1,12 +0,0 @@ -#![allow(dead_code)] - -use std::panic::UnwindSafe; -use std::cell::RefCell; - -fn assert<T: UnwindSafe + ?Sized>() {} - -fn main() { - assert::<&RefCell<i32>>(); - //~^ ERROR the type `UnsafeCell<i32>` may contain interior mutability and a - //~| ERROR the type `UnsafeCell<isize>` may contain interior mutability and a -} diff --git a/src/test/ui/not-panic/not-panic-safe-4.stderr b/src/test/ui/not-panic/not-panic-safe-4.stderr deleted file mode 100644 index fc1c594d0..000000000 --- a/src/test/ui/not-panic/not-panic-safe-4.stderr +++ /dev/null @@ -1,34 +0,0 @@ -error[E0277]: the type `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary - --> $DIR/not-panic-safe-4.rs:9:14 - | -LL | assert::<&RefCell<i32>>(); - | ^^^^^^^^^^^^^ `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary - | - = help: within `RefCell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<i32>` - = note: required because it appears within the type `RefCell<i32>` - = note: required for `&RefCell<i32>` to implement `UnwindSafe` -note: required by a bound in `assert` - --> $DIR/not-panic-safe-4.rs:6:14 - | -LL | fn assert<T: UnwindSafe + ?Sized>() {} - | ^^^^^^^^^^ required by this bound in `assert` - -error[E0277]: the type `UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary - --> $DIR/not-panic-safe-4.rs:9:14 - | -LL | assert::<&RefCell<i32>>(); - | ^^^^^^^^^^^^^ `UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary - | - = help: within `RefCell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<isize>` - = note: required because it appears within the type `Cell<isize>` - = note: required because it appears within the type `RefCell<i32>` - = note: required for `&RefCell<i32>` to implement `UnwindSafe` -note: required by a bound in `assert` - --> $DIR/not-panic-safe-4.rs:6:14 - | -LL | fn assert<T: UnwindSafe + ?Sized>() {} - | ^^^^^^^^^^ required by this bound in `assert` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/not-panic/not-panic-safe-5.rs b/src/test/ui/not-panic/not-panic-safe-5.rs deleted file mode 100644 index e0d37517d..000000000 --- a/src/test/ui/not-panic/not-panic-safe-5.rs +++ /dev/null @@ -1,10 +0,0 @@ -#![allow(dead_code)] - -use std::panic::UnwindSafe; -use std::cell::UnsafeCell; - -fn assert<T: UnwindSafe + ?Sized>() {} - -fn main() { - assert::<*const UnsafeCell<i32>>(); //~ ERROR E0277 -} diff --git a/src/test/ui/not-panic/not-panic-safe-5.stderr b/src/test/ui/not-panic/not-panic-safe-5.stderr deleted file mode 100644 index cb78370b4..000000000 --- a/src/test/ui/not-panic/not-panic-safe-5.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0277]: the type `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary - --> $DIR/not-panic-safe-5.rs:9:14 - | -LL | assert::<*const UnsafeCell<i32>>(); - | ^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary - | - = help: the trait `RefUnwindSafe` is not implemented for `UnsafeCell<i32>` - = note: required for `*const UnsafeCell<i32>` to implement `UnwindSafe` -note: required by a bound in `assert` - --> $DIR/not-panic-safe-5.rs:6:14 - | -LL | fn assert<T: UnwindSafe + ?Sized>() {} - | ^^^^^^^^^^ required by this bound in `assert` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/not-panic/not-panic-safe-6.rs b/src/test/ui/not-panic/not-panic-safe-6.rs deleted file mode 100644 index 4915096dc..000000000 --- a/src/test/ui/not-panic/not-panic-safe-6.rs +++ /dev/null @@ -1,12 +0,0 @@ -#![allow(dead_code)] - -use std::panic::UnwindSafe; -use std::cell::RefCell; - -fn assert<T: UnwindSafe + ?Sized>() {} - -fn main() { - assert::<*mut RefCell<i32>>(); - //~^ ERROR the type `UnsafeCell<i32>` may contain interior mutability and a - //~| ERROR the type `UnsafeCell<isize>` may contain interior mutability and a -} diff --git a/src/test/ui/not-panic/not-panic-safe-6.stderr b/src/test/ui/not-panic/not-panic-safe-6.stderr deleted file mode 100644 index 7986e341e..000000000 --- a/src/test/ui/not-panic/not-panic-safe-6.stderr +++ /dev/null @@ -1,34 +0,0 @@ -error[E0277]: the type `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary - --> $DIR/not-panic-safe-6.rs:9:14 - | -LL | assert::<*mut RefCell<i32>>(); - | ^^^^^^^^^^^^^^^^^ `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary - | - = help: within `RefCell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<i32>` - = note: required because it appears within the type `RefCell<i32>` - = note: required for `*mut RefCell<i32>` to implement `UnwindSafe` -note: required by a bound in `assert` - --> $DIR/not-panic-safe-6.rs:6:14 - | -LL | fn assert<T: UnwindSafe + ?Sized>() {} - | ^^^^^^^^^^ required by this bound in `assert` - -error[E0277]: the type `UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary - --> $DIR/not-panic-safe-6.rs:9:14 - | -LL | assert::<*mut RefCell<i32>>(); - | ^^^^^^^^^^^^^^^^^ `UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary - | - = help: within `RefCell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<isize>` - = note: required because it appears within the type `Cell<isize>` - = note: required because it appears within the type `RefCell<i32>` - = note: required for `*mut RefCell<i32>` to implement `UnwindSafe` -note: required by a bound in `assert` - --> $DIR/not-panic-safe-6.rs:6:14 - | -LL | fn assert<T: UnwindSafe + ?Sized>() {} - | ^^^^^^^^^^ required by this bound in `assert` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/not-panic/not-panic-safe.rs b/src/test/ui/not-panic/not-panic-safe.rs deleted file mode 100644 index 4165c5dc1..000000000 --- a/src/test/ui/not-panic/not-panic-safe.rs +++ /dev/null @@ -1,10 +0,0 @@ -#![allow(dead_code)] - -use std::panic::UnwindSafe; - -fn assert<T: UnwindSafe + ?Sized>() {} - -fn main() { - assert::<&mut i32>(); - //~^ ERROR the type `&mut i32` may not be safely transferred across an unwind boundary -} diff --git a/src/test/ui/not-panic/not-panic-safe.stderr b/src/test/ui/not-panic/not-panic-safe.stderr deleted file mode 100644 index 2cd51a439..000000000 --- a/src/test/ui/not-panic/not-panic-safe.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0277]: the type `&mut i32` may not be safely transferred across an unwind boundary - --> $DIR/not-panic-safe.rs:8:14 - | -LL | assert::<&mut i32>(); - | -^^^^^^^ - | | - | `&mut i32` may not be safely transferred across an unwind boundary - | help: consider removing the leading `&`-reference - | - = help: the trait `UnwindSafe` is not implemented for `&mut i32` - = note: `UnwindSafe` is implemented for `&i32`, but not for `&mut i32` -note: required by a bound in `assert` - --> $DIR/not-panic-safe.rs:5:14 - | -LL | fn assert<T: UnwindSafe + ?Sized>() {} - | ^^^^^^^^^^ required by this bound in `assert` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. |