diff options
| author | The 8472 <git@infinite-source.de> | 2023-02-16 01:49:00 +0100 |
|---|---|---|
| committer | The 8472 <git@infinite-source.de> | 2023-04-27 22:29:04 +0200 |
| commit | 1a51ec686439b52bd652b32f8f7aaf7817faf5a7 (patch) | |
| tree | f22564f1be3a7c6f394075519663d24419f1f675 | |
| parent | 351e208f4c24069c141b630f35c09ebe9107fd5a (diff) | |
| download | rust-1a51ec686439b52bd652b32f8f7aaf7817faf5a7.tar.gz rust-1a51ec686439b52bd652b32f8f7aaf7817faf5a7.zip | |
bless tests
| -rw-r--r-- | tests/codegen/issues/issue-86106.rs | 30 | ||||
| -rw-r--r-- | tests/ui/async-await/future-sizes/async-awaiting-fut.stdout | 40 | ||||
| -rw-r--r-- | tests/ui/async-await/future-sizes/large-arg.stdout | 24 | ||||
| -rw-r--r-- | tests/ui/consts/const-eval/raw-bytes.32bit.stderr | 4 | ||||
| -rw-r--r-- | tests/ui/consts/const-eval/raw-bytes.64bit.stderr | 4 | ||||
| -rw-r--r-- | tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr | 40 | ||||
| -rw-r--r-- | tests/ui/print_type_sizes/async.stdout | 8 | ||||
| -rw-r--r-- | tests/ui/print_type_sizes/generator.stdout | 8 |
8 files changed, 71 insertions, 87 deletions
diff --git a/tests/codegen/issues/issue-86106.rs b/tests/codegen/issues/issue-86106.rs index 9ccbcb24f56..af621d79391 100644 --- a/tests/codegen/issues/issue-86106.rs +++ b/tests/codegen/issues/issue-86106.rs @@ -9,12 +9,9 @@ // CHECK-LABEL: define void @string_new #[no_mangle] pub fn string_new() -> String { - // CHECK-NOT: load i8 - // CHECK: store i{{32|64}} + // CHECK: store ptr inttoptr // CHECK-NEXT: getelementptr - // CHECK-NEXT: store ptr - // CHECK-NEXT: getelementptr - // CHECK-NEXT: store i{{32|64}} + // CHECK-NEXT: call void @llvm.memset // CHECK-NEXT: ret void String::new() } @@ -22,12 +19,9 @@ pub fn string_new() -> String { // CHECK-LABEL: define void @empty_to_string #[no_mangle] pub fn empty_to_string() -> String { - // CHECK-NOT: load i8 - // CHECK: store i{{32|64}} - // CHECK-NEXT: getelementptr - // CHECK-NEXT: store ptr - // CHECK-NEXT: getelementptr - // CHECK-NEXT: store i{{32|64}} + // CHECK: getelementptr + // CHECK-NEXT: call void @llvm.memset + // CHECK-NEXT: store ptr inttoptr // CHECK-NEXT: ret void "".to_string() } @@ -38,12 +32,9 @@ pub fn empty_to_string() -> String { // CHECK-LABEL: @empty_vec #[no_mangle] pub fn empty_vec() -> Vec<u8> { - // CHECK: store i{{32|64}} - // CHECK-NOT: load i8 + // CHECK: store ptr inttoptr // CHECK-NEXT: getelementptr - // CHECK-NEXT: store ptr - // CHECK-NEXT: getelementptr - // CHECK-NEXT: store i{{32|64}} + // CHECK-NEXT: call void @llvm.memset // CHECK-NEXT: ret void vec![] } @@ -51,12 +42,9 @@ pub fn empty_vec() -> Vec<u8> { // CHECK-LABEL: @empty_vec_clone #[no_mangle] pub fn empty_vec_clone() -> Vec<u8> { - // CHECK: store i{{32|64}} - // CHECK-NOT: load i8 - // CHECK-NEXT: getelementptr - // CHECK-NEXT: store ptr + // CHECK: store ptr inttoptr // CHECK-NEXT: getelementptr - // CHECK-NEXT: store i{{32|64}} + // CHECK-NEXT: call void @llvm.memset // CHECK-NEXT: ret void vec![].clone() } diff --git a/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout b/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout index eaf3e4b61e3..c0fbb0204b3 100644 --- a/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout +++ b/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout @@ -2,38 +2,34 @@ print-type-size type: `[async fn body@$DIR/async-awaiting-fut.rs:21:21: 24:2]`: print-type-size discriminant: 1 bytes print-type-size variant `Unresumed`: 0 bytes print-type-size variant `Suspend0`: 3077 bytes -print-type-size local `.__awaitee`: 3077 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size local `.__awaitee`: 3077 bytes print-type-size variant `Returned`: 0 bytes print-type-size variant `Panicked`: 0 bytes print-type-size type: `[async fn body@$DIR/async-awaiting-fut.rs:10:64: 19:2]`: 3077 bytes, alignment: 1 bytes print-type-size discriminant: 1 bytes -print-type-size variant `Unresumed`: 2051 bytes -print-type-size padding: 1026 bytes -print-type-size upvar `.fut`: 1025 bytes, alignment: 1 bytes +print-type-size variant `Unresumed`: 1025 bytes +print-type-size upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes print-type-size variant `Suspend0`: 2052 bytes -print-type-size local `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes -print-type-size local `..generator_field4`: 1 bytes +print-type-size upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes print-type-size padding: 1 bytes -print-type-size upvar `.fut`: 1025 bytes, alignment: 1 bytes +print-type-size local `.fut`: 1025 bytes, alignment: 1 bytes +print-type-size local `..generator_field4`: 1 bytes print-type-size local `.__awaitee`: 1 bytes print-type-size variant `Suspend1`: 3076 bytes -print-type-size padding: 1024 bytes +print-type-size upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size padding: 1026 bytes print-type-size local `..generator_field4`: 1 bytes, alignment: 1 bytes -print-type-size padding: 1 bytes -print-type-size upvar `.fut`: 1025 bytes, alignment: 1 bytes print-type-size local `.__awaitee`: 1025 bytes print-type-size variant `Suspend2`: 2052 bytes -print-type-size local `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes -print-type-size local `..generator_field4`: 1 bytes +print-type-size upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes print-type-size padding: 1 bytes -print-type-size upvar `.fut`: 1025 bytes, alignment: 1 bytes +print-type-size local `.fut`: 1025 bytes, alignment: 1 bytes +print-type-size local `..generator_field4`: 1 bytes print-type-size local `.__awaitee`: 1 bytes -print-type-size variant `Returned`: 2051 bytes -print-type-size padding: 1026 bytes -print-type-size upvar `.fut`: 1025 bytes, alignment: 1 bytes -print-type-size variant `Panicked`: 2051 bytes -print-type-size padding: 1026 bytes -print-type-size upvar `.fut`: 1025 bytes, alignment: 1 bytes +print-type-size variant `Returned`: 1025 bytes +print-type-size upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size variant `Panicked`: 1025 bytes +print-type-size upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes print-type-size type: `std::mem::ManuallyDrop<[async fn body@$DIR/async-awaiting-fut.rs:10:64: 19:2]>`: 3077 bytes, alignment: 1 bytes print-type-size field `.value`: 3077 bytes print-type-size type: `std::mem::MaybeUninit<[async fn body@$DIR/async-awaiting-fut.rs:10:64: 19:2]>`: 3077 bytes, alignment: 1 bytes @@ -43,11 +39,11 @@ print-type-size field `.value`: 3077 bytes print-type-size type: `[async fn body@$DIR/async-awaiting-fut.rs:8:35: 8:37]`: 1025 bytes, alignment: 1 bytes print-type-size discriminant: 1 bytes print-type-size variant `Unresumed`: 1024 bytes -print-type-size upvar `.arg`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.arg`: 1024 bytes print-type-size variant `Returned`: 1024 bytes -print-type-size upvar `.arg`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.arg`: 1024 bytes print-type-size variant `Panicked`: 1024 bytes -print-type-size upvar `.arg`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.arg`: 1024 bytes print-type-size type: `std::mem::ManuallyDrop<[async fn body@$DIR/async-awaiting-fut.rs:8:35: 8:37]>`: 1025 bytes, alignment: 1 bytes print-type-size field `.value`: 1025 bytes print-type-size type: `std::mem::MaybeUninit<[async fn body@$DIR/async-awaiting-fut.rs:8:35: 8:37]>`: 1025 bytes, alignment: 1 bytes diff --git a/tests/ui/async-await/future-sizes/large-arg.stdout b/tests/ui/async-await/future-sizes/large-arg.stdout index 91db4b1531f..b5e95ddd710 100644 --- a/tests/ui/async-await/future-sizes/large-arg.stdout +++ b/tests/ui/async-await/future-sizes/large-arg.stdout @@ -2,20 +2,20 @@ print-type-size type: `[async fn body@$DIR/large-arg.rs:6:21: 8:2]`: 3076 bytes, print-type-size discriminant: 1 bytes print-type-size variant `Unresumed`: 0 bytes print-type-size variant `Suspend0`: 3075 bytes -print-type-size local `.__awaitee`: 3075 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size local `.__awaitee`: 3075 bytes print-type-size variant `Returned`: 0 bytes print-type-size variant `Panicked`: 0 bytes print-type-size type: `[async fn body@$DIR/large-arg.rs:10:30: 12:2]`: 3075 bytes, alignment: 1 bytes print-type-size discriminant: 1 bytes print-type-size variant `Unresumed`: 1024 bytes -print-type-size upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.t`: 1024 bytes print-type-size variant `Suspend0`: 3074 bytes -print-type-size upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.t`: 1024 bytes print-type-size local `.__awaitee`: 2050 bytes print-type-size variant `Returned`: 1024 bytes -print-type-size upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.t`: 1024 bytes print-type-size variant `Panicked`: 1024 bytes -print-type-size upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.t`: 1024 bytes print-type-size type: `std::mem::ManuallyDrop<[async fn body@$DIR/large-arg.rs:10:30: 12:2]>`: 3075 bytes, alignment: 1 bytes print-type-size field `.value`: 3075 bytes print-type-size type: `std::mem::MaybeUninit<[async fn body@$DIR/large-arg.rs:10:30: 12:2]>`: 3075 bytes, alignment: 1 bytes @@ -25,14 +25,14 @@ print-type-size field `.value`: 3075 bytes print-type-size type: `[async fn body@$DIR/large-arg.rs:13:26: 15:2]`: 2050 bytes, alignment: 1 bytes print-type-size discriminant: 1 bytes print-type-size variant `Unresumed`: 1024 bytes -print-type-size upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.t`: 1024 bytes print-type-size variant `Suspend0`: 2049 bytes -print-type-size upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.t`: 1024 bytes print-type-size local `.__awaitee`: 1025 bytes print-type-size variant `Returned`: 1024 bytes -print-type-size upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.t`: 1024 bytes print-type-size variant `Panicked`: 1024 bytes -print-type-size upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.t`: 1024 bytes print-type-size type: `std::mem::ManuallyDrop<[async fn body@$DIR/large-arg.rs:13:26: 15:2]>`: 2050 bytes, alignment: 1 bytes print-type-size field `.value`: 2050 bytes print-type-size type: `std::mem::MaybeUninit<[async fn body@$DIR/large-arg.rs:13:26: 15:2]>`: 2050 bytes, alignment: 1 bytes @@ -42,11 +42,11 @@ print-type-size field `.value`: 2050 bytes print-type-size type: `[async fn body@$DIR/large-arg.rs:16:26: 18:2]`: 1025 bytes, alignment: 1 bytes print-type-size discriminant: 1 bytes print-type-size variant `Unresumed`: 1024 bytes -print-type-size upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.t`: 1024 bytes print-type-size variant `Returned`: 1024 bytes -print-type-size upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.t`: 1024 bytes print-type-size variant `Panicked`: 1024 bytes -print-type-size upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.t`: 1024 bytes print-type-size type: `std::mem::ManuallyDrop<[async fn body@$DIR/large-arg.rs:16:26: 18:2]>`: 1025 bytes, alignment: 1 bytes print-type-size field `.value`: 1025 bytes print-type-size type: `std::mem::MaybeUninit<[async fn body@$DIR/large-arg.rs:16:26: 18:2]>`: 1025 bytes, alignment: 1 bytes diff --git a/tests/ui/consts/const-eval/raw-bytes.32bit.stderr b/tests/ui/consts/const-eval/raw-bytes.32bit.stderr index a0f8dd097c7..a93b561e5be 100644 --- a/tests/ui/consts/const-eval/raw-bytes.32bit.stderr +++ b/tests/ui/consts/const-eval/raw-bytes.32bit.stderr @@ -465,7 +465,7 @@ LL | const LAYOUT_INVALID_ZERO: Layout = unsafe { Layout::from_size_align_unchec | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. = note: the raw bytes of the constant (size: 8, align: 4) { - 00 10 00 00 00 00 00 00 │ ........ + 00 00 00 00 00 10 00 00 │ ........ } error[E0080]: it is undefined behavior to use this value @@ -476,7 +476,7 @@ LL | const LAYOUT_INVALID_THREE: Layout = unsafe { Layout::from_size_align_unche | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. = note: the raw bytes of the constant (size: 8, align: 4) { - 09 00 00 00 03 00 00 00 │ ........ + 03 00 00 00 09 00 00 00 │ ........ } error[E0080]: it is undefined behavior to use this value diff --git a/tests/ui/consts/const-eval/raw-bytes.64bit.stderr b/tests/ui/consts/const-eval/raw-bytes.64bit.stderr index 9706f3ec2e0..a32d4863a38 100644 --- a/tests/ui/consts/const-eval/raw-bytes.64bit.stderr +++ b/tests/ui/consts/const-eval/raw-bytes.64bit.stderr @@ -465,7 +465,7 @@ LL | const LAYOUT_INVALID_ZERO: Layout = unsafe { Layout::from_size_align_unchec | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. = note: the raw bytes of the constant (size: 16, align: 8) { - 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................ + 00 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 │ ................ } error[E0080]: it is undefined behavior to use this value @@ -476,7 +476,7 @@ LL | const LAYOUT_INVALID_THREE: Layout = unsafe { Layout::from_size_align_unche | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. = note: the raw bytes of the constant (size: 16, align: 8) { - 09 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 │ ................ + 03 00 00 00 00 00 00 00 09 00 00 00 00 00 00 00 │ ................ } error[E0080]: it is undefined behavior to use this value diff --git a/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr b/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr index 20d4c418e87..8c7c915350f 100644 --- a/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr +++ b/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr @@ -370,23 +370,23 @@ error: layout_of(NicheFirst) = Layout { pref: $PREF_ALIGN, }, abi: ScalarPair( - Union { + Initialized { value: Int( I8, false, ), + valid_range: 0..=4, }, - Initialized { + Union { value: Int( I8, false, ), - valid_range: 0..=4, }, ), fields: Arbitrary { offsets: [ - Size(1 bytes), + Size(0 bytes), ], memory_index: [ 0, @@ -394,7 +394,7 @@ error: layout_of(NicheFirst) = Layout { }, largest_niche: Some( Niche { - offset: Size(1 bytes), + offset: Size(0 bytes), value: Int( I8, false, @@ -429,29 +429,29 @@ error: layout_of(NicheFirst) = Layout { I8, false, ), - valid_range: 0..=255, + valid_range: 0..=2, }, Initialized { value: Int( I8, false, ), - valid_range: 0..=2, + valid_range: 0..=255, }, ), fields: Arbitrary { offsets: [ - Size(1 bytes), Size(0 bytes), + Size(1 bytes), ], memory_index: [ - 1, 0, + 1, ], }, largest_niche: Some( Niche { - offset: Size(1 bytes), + offset: Size(0 bytes), value: Int( I8, false, @@ -514,23 +514,23 @@ error: layout_of(NicheSecond) = Layout { pref: $PREF_ALIGN, }, abi: ScalarPair( - Union { + Initialized { value: Int( I8, false, ), + valid_range: 0..=4, }, - Initialized { + Union { value: Int( I8, false, ), - valid_range: 0..=4, }, ), fields: Arbitrary { offsets: [ - Size(1 bytes), + Size(0 bytes), ], memory_index: [ 0, @@ -538,7 +538,7 @@ error: layout_of(NicheSecond) = Layout { }, largest_niche: Some( Niche { - offset: Size(1 bytes), + offset: Size(0 bytes), value: Int( I8, false, @@ -573,29 +573,29 @@ error: layout_of(NicheSecond) = Layout { I8, false, ), - valid_range: 0..=255, + valid_range: 0..=2, }, Initialized { value: Int( I8, false, ), - valid_range: 0..=2, + valid_range: 0..=255, }, ), fields: Arbitrary { offsets: [ - Size(0 bytes), Size(1 bytes), + Size(0 bytes), ], memory_index: [ - 0, 1, + 0, ], }, largest_niche: Some( Niche { - offset: Size(1 bytes), + offset: Size(0 bytes), value: Int( I8, false, diff --git a/tests/ui/print_type_sizes/async.stdout b/tests/ui/print_type_sizes/async.stdout index 8fe936efc89..1c6887412be 100644 --- a/tests/ui/print_type_sizes/async.stdout +++ b/tests/ui/print_type_sizes/async.stdout @@ -1,15 +1,15 @@ print-type-size type: `[async fn body@$DIR/async.rs:8:36: 11:2]`: 16386 bytes, alignment: 1 bytes print-type-size discriminant: 1 bytes print-type-size variant `Unresumed`: 8192 bytes -print-type-size upvar `.arg`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.arg`: 8192 bytes print-type-size variant `Suspend0`: 16385 bytes -print-type-size upvar `.arg`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.arg`: 8192 bytes print-type-size local `.arg`: 8192 bytes print-type-size local `.__awaitee`: 1 bytes print-type-size variant `Returned`: 8192 bytes -print-type-size upvar `.arg`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.arg`: 8192 bytes print-type-size variant `Panicked`: 8192 bytes -print-type-size upvar `.arg`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.arg`: 8192 bytes print-type-size type: `std::mem::ManuallyDrop<[u8; 8192]>`: 8192 bytes, alignment: 1 bytes print-type-size field `.value`: 8192 bytes print-type-size type: `std::mem::MaybeUninit<[u8; 8192]>`: 8192 bytes, alignment: 1 bytes diff --git a/tests/ui/print_type_sizes/generator.stdout b/tests/ui/print_type_sizes/generator.stdout index 7c58d6ce5ff..2dcadde9ec2 100644 --- a/tests/ui/print_type_sizes/generator.stdout +++ b/tests/ui/print_type_sizes/generator.stdout @@ -1,10 +1,10 @@ print-type-size type: `[generator@$DIR/generator.rs:10:5: 10:14]`: 8193 bytes, alignment: 1 bytes print-type-size discriminant: 1 bytes print-type-size variant `Unresumed`: 8192 bytes -print-type-size upvar `.array`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.array`: 8192 bytes print-type-size variant `Suspend0`: 8192 bytes -print-type-size upvar `.array`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.array`: 8192 bytes print-type-size variant `Returned`: 8192 bytes -print-type-size upvar `.array`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.array`: 8192 bytes print-type-size variant `Panicked`: 8192 bytes -print-type-size upvar `.array`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes +print-type-size upvar `.array`: 8192 bytes |
