diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2025-06-04 08:46:49 +0000 |
|---|---|---|
| committer | Oli Scherer <github333195615777966@oli-obk.de> | 2025-06-30 08:06:08 +0000 |
| commit | 9b5d57d0a9d8ba75fd1602f62d0bfd9f2f6acd1e (patch) | |
| tree | 237925507e6d88ad8e649ab24f2a9dfea62e726c /tests/ui/layout | |
| parent | cca072ca151d766bc9a40b82b1fc5e67ef5fee1e (diff) | |
| download | rust-9b5d57d0a9d8ba75fd1602f62d0bfd9f2f6acd1e.tar.gz rust-9b5d57d0a9d8ba75fd1602f62d0bfd9f2f6acd1e.zip | |
Unconditionally run `check_item_type` on all items
Diffstat (limited to 'tests/ui/layout')
| -rw-r--r-- | tests/ui/layout/ice-non-last-unsized-field-issue-121473.stderr | 24 | ||||
| -rw-r--r-- | tests/ui/layout/rust-call-abi-not-a-tuple-ice-81974.stderr | 30 |
2 files changed, 27 insertions, 27 deletions
diff --git a/tests/ui/layout/ice-non-last-unsized-field-issue-121473.stderr b/tests/ui/layout/ice-non-last-unsized-field-issue-121473.stderr index 626be7ac283..b0ea655fc67 100644 --- a/tests/ui/layout/ice-non-last-unsized-field-issue-121473.stderr +++ b/tests/ui/layout/ice-non-last-unsized-field-issue-121473.stderr @@ -70,6 +70,18 @@ help: the `Box` type always has a statically known size and allocates its conten LL | field2: Box<str>, // Unsized | ++++ + +error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union + --> $DIR/ice-non-last-unsized-field-issue-121473.rs:46:5 + | +LL | field2: str, // Unsized + | ^^^^^^^^^^^ + | + = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>` +help: wrap the field type in `ManuallyDrop<...>` + | +LL | field2: std::mem::ManuallyDrop<str>, // Unsized + | +++++++++++++++++++++++ + + error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/ice-non-last-unsized-field-issue-121473.rs:46:13 | @@ -88,18 +100,6 @@ help: the `Box` type always has a statically known size and allocates its conten LL | field2: Box<str>, // Unsized | ++++ + -error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union - --> $DIR/ice-non-last-unsized-field-issue-121473.rs:46:5 - | -LL | field2: str, // Unsized - | ^^^^^^^^^^^ - | - = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>` -help: wrap the field type in `ManuallyDrop<...>` - | -LL | field2: std::mem::ManuallyDrop<str>, // Unsized - | +++++++++++++++++++++++ + - error: aborting due to 6 previous errors Some errors have detailed explanations: E0277, E0740. diff --git a/tests/ui/layout/rust-call-abi-not-a-tuple-ice-81974.stderr b/tests/ui/layout/rust-call-abi-not-a-tuple-ice-81974.stderr index 32a564e466b..75ee936d9e8 100644 --- a/tests/ui/layout/rust-call-abi-not-a-tuple-ice-81974.stderr +++ b/tests/ui/layout/rust-call-abi-not-a-tuple-ice-81974.stderr @@ -1,4 +1,17 @@ error[E0059]: type parameter to bare `FnOnce` trait must be a tuple + --> $DIR/rust-call-abi-not-a-tuple-ice-81974.rs:31:5 + | +LL | extern "rust-call" fn call_once(mut self, a: A) -> Self::Output { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Tuple` is not implemented for `A` + | +note: required by a bound in `FnOnce` + --> $SRC_DIR/core/src/ops/function.rs:LL:COL +help: consider further restricting type parameter `A` with unstable trait `Tuple` + | +LL | A: Eq + Hash + Clone + std::marker::Tuple, + | ++++++++++++++++++++ + +error[E0059]: type parameter to bare `FnOnce` trait must be a tuple --> $DIR/rust-call-abi-not-a-tuple-ice-81974.rs:24:12 | LL | impl<A, B> FnOnce<A> for CachedFun<A, B> @@ -12,9 +25,9 @@ LL | A: Eq + Hash + Clone + std::marker::Tuple, | ++++++++++++++++++++ error[E0059]: type parameter to bare `FnOnce` trait must be a tuple - --> $DIR/rust-call-abi-not-a-tuple-ice-81974.rs:31:5 + --> $DIR/rust-call-abi-not-a-tuple-ice-81974.rs:45:5 | -LL | extern "rust-call" fn call_once(mut self, a: A) -> Self::Output { +LL | extern "rust-call" fn call_mut(&mut self, a: A) -> Self::Output { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Tuple` is not implemented for `A` | note: required by a bound in `FnOnce` @@ -37,19 +50,6 @@ help: consider further restricting type parameter `A` with unstable trait `Tuple LL | A: Eq + Hash + Clone + std::marker::Tuple, | ++++++++++++++++++++ -error[E0059]: type parameter to bare `FnOnce` trait must be a tuple - --> $DIR/rust-call-abi-not-a-tuple-ice-81974.rs:45:5 - | -LL | extern "rust-call" fn call_mut(&mut self, a: A) -> Self::Output { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Tuple` is not implemented for `A` - | -note: required by a bound in `FnOnce` - --> $SRC_DIR/core/src/ops/function.rs:LL:COL -help: consider further restricting type parameter `A` with unstable trait `Tuple` - | -LL | A: Eq + Hash + Clone + std::marker::Tuple, - | ++++++++++++++++++++ - error[E0277]: functions with the "rust-call" ABI must take a single non-self tuple argument --> $DIR/rust-call-abi-not-a-tuple-ice-81974.rs:31:5 | |
