diff options
| author | Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> | 2023-01-05 09:13:28 +0100 |
|---|---|---|
| committer | Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> | 2023-01-11 09:32:08 +0000 |
| commit | cf2dff2b1e3fa55fa5415d524200070d0d7aacfe (patch) | |
| tree | 40a88d9a46aaf3e8870676eb2538378b75a263eb /src/test/ui/not-panic | |
| parent | ca855e6e42787ecd062d81d53336fe6788ef51a9 (diff) | |
| download | rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.tar.gz rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.zip | |
Move /src/test to /tests
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 f3faa704329..00000000000 --- 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 3b0f83b3b9a..00000000000 --- 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 21f0c099312..00000000000 --- 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 9e9a12764a4..00000000000 --- 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 ba93af5c0aa..00000000000 --- 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 fc1c594d0d4..00000000000 --- 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 e0d37517dd4..00000000000 --- 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 cb78370b48a..00000000000 --- 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 4915096dc3b..00000000000 --- 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 7986e341eb0..00000000000 --- 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 4165c5dc13a..00000000000 --- 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 2cd51a43998..00000000000 --- 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`. |
