Skip to content

Commit 9ad8cc5

Browse files
committed
Normalize tests for i686 Windows.
1 parent 76801d9 commit 9ad8cc5

26 files changed

+58
-82
lines changed

src/test/ui/huge-enum.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// error-pattern: Option
12+
// normalize-stderr-test "<\[u32; \d+\]>" -> "<[u32; N]>"
1213

1314
// FIXME: work properly with higher limits
1415

src/test/ui/huge-enum.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: the type `std::option::Option<[u32; 35184372088831]>` is too big for the current architecture
1+
error: the type `std::option::Option<[u32; N]>` is too big for the current architecture
22

33
error: aborting due to previous error
44

src/test/ui/huge-struct.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// normalize-stderr-test "S32" -> "SXX"
12+
// normalize-stderr-test "S1M" -> "SXX"
1113
// error-pattern: too big for the current
1214

1315
struct S32<T> {

src/test/ui/huge-struct.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: the type `S32<S1M<S1M<u32>>>` is too big for the current architecture
1+
error: the type `SXX<SXX<SXX<u32>>>` is too big for the current architecture
22

33
error: aborting due to previous error
44

src/test/ui/issues/issue-15919.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// error-pattern: too big for the current architecture
12+
// normalize-stderr-test "\[usize; \d+\]" -> "[usize; N]"
1213

1314
#[cfg(target_pointer_width = "32")]
1415
fn main() {

src/test/ui/issues/issue-15919.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: the type `[usize; 18446744073709551615]` is too big for the current architecture
1+
error: the type `[usize; N]` is too big for the current architecture
22

33
error: aborting due to previous error
44

src/test/ui/issues/issue-17913.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
11+
// normalize-stderr-test "\[&usize; \d+\]" -> "[&usize; N]"
1212
// error-pattern: too big for the current architecture
1313

1414
#![feature(box_syntax)]

src/test/ui/issues/issue-17913.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: the type `[&usize; 17293822569102704640]` is too big for the current architecture
1+
error: the type `[&usize; N]` is too big for the current architecture
22

33
error: aborting due to previous error
44

src/test/ui/issues/issue-23595-1.stderr

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/test/ui/issues/issue-28625.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// normalize-stderr-test "\d+ bits" -> "N bits"
12+
1113
trait Bar {
1214
type Bar;
1315
}

src/test/ui/issues/issue-28625.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0512]: transmute called with types of different sizes
2-
--> $DIR/issue-28625.rs:20:14
2+
--> $DIR/issue-28625.rs:22:14
33
|
44
LL | unsafe { std::mem::transmute(a) } //~ ERROR transmute called with types of different sizes
55
| ^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: source type: &ArrayPeano<T> (64 bits)
8-
= note: target type: &[T] (128 bits)
7+
= note: source type: &ArrayPeano<T> (N bits)
8+
= note: target type: &[T] (N bits)
99

1010
error: aborting due to previous error
1111

src/test/ui/issues/issue-32377.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// normalize-stderr-test "\d+ bits" -> "N bits"
12+
1113
use std::mem;
1214
use std::marker::PhantomData;
1315

src/test/ui/issues/issue-32377.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0512]: transmute called with types of different sizes
2-
--> $DIR/issue-32377.rs:23:14
2+
--> $DIR/issue-32377.rs:25:14
33
|
44
LL | unsafe { mem::transmute(x) }
55
| ^^^^^^^^^^^^^^
66
|
7-
= note: source type: [usize; 2] (128 bits)
8-
= note: target type: Bar<U> (0 bits)
7+
= note: source type: [usize; 2] (N bits)
8+
= note: target type: Bar<U> (N bits)
99

1010
error: aborting due to previous error
1111

src/test/ui/issues/issue-43733-2.stderr

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/test/ui/packed-struct/packed-struct-transmute.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// the error points to the start of the file, not the line with the
1414
// transmute
1515

16+
// normalize-stderr-test "\d+ bits" -> "N bits"
1617
// error-pattern: transmute called with types of different sizes
1718

1819
use std::mem;

src/test/ui/packed-struct/packed-struct-transmute.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0512]: transmute called with types of different sizes
2-
--> $DIR/packed-struct-transmute.rs:35:24
2+
--> $DIR/packed-struct-transmute.rs:36:24
33
|
44
LL | let oof: Oof = mem::transmute(foo);
55
| ^^^^^^^^^^^^^^
66
|
7-
= note: source type: Foo (72 bits)
8-
= note: target type: Oof (128 bits)
7+
= note: source type: Foo (N bits)
8+
= note: target type: Oof (N bits)
99

1010
error: aborting due to previous error
1111

src/test/ui/transmute/transmute-different-sizes.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// normalize-stderr-test "\d+ bits" -> "N bits"
12+
1113
// Tests that `transmute` cannot be called on types of different size.
1214

1315
#![allow(warnings)]

src/test/ui/transmute/transmute-different-sizes.stderr

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
error[E0512]: transmute called with types of different sizes
2-
--> $DIR/transmute-different-sizes.rs:19:17
2+
--> $DIR/transmute-different-sizes.rs:21:17
33
|
44
LL | let _: i8 = transmute(16i16);
55
| ^^^^^^^^^
66
|
7-
= note: source type: i16 (16 bits)
8-
= note: target type: i8 (8 bits)
7+
= note: source type: i16 (N bits)
8+
= note: target type: i8 (N bits)
99

1010
error[E0512]: transmute called with types of different sizes
11-
--> $DIR/transmute-different-sizes.rs:24:17
11+
--> $DIR/transmute-different-sizes.rs:26:17
1212
|
1313
LL | let _: i8 = transmute(x);
1414
| ^^^^^^^^^
1515
|
16-
= note: source type: &T (64 bits)
17-
= note: target type: i8 (8 bits)
16+
= note: source type: &T (N bits)
17+
= note: target type: i8 (N bits)
1818

1919
error[E0512]: transmute called with types of different sizes
20-
--> $DIR/transmute-different-sizes.rs:35:5
20+
--> $DIR/transmute-different-sizes.rs:37:5
2121
|
2222
LL | transmute(x)
2323
| ^^^^^^^^^
2424
|
25-
= note: source type: u16 (16 bits)
25+
= note: source type: u16 (N bits)
2626
= note: target type: <T as Specializable>::Output (this type's size can vary)
2727

2828
error: aborting due to 3 previous errors

src/test/ui/transmute/transmute-fat-pointers.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// normalize-stderr-test "\d+ bits" -> "N bits"
12+
1113
// Tests that are conservative around thin/fat pointer mismatches.
1214

1315
#![allow(dead_code)]

src/test/ui/transmute/transmute-fat-pointers.stderr

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
error[E0512]: transmute called with types of different sizes
2-
--> $DIR/transmute-fat-pointers.rs:18:14
2+
--> $DIR/transmute-fat-pointers.rs:20:14
33
|
44
LL | unsafe { transmute(x) } //~ ERROR transmute called with types of different sizes
55
| ^^^^^^^^^
66
|
7-
= note: source type: &[T] (128 bits)
7+
= note: source type: &[T] (N bits)
88
= note: target type: &U (pointer to U)
99

1010
error[E0512]: transmute called with types of different sizes
11-
--> $DIR/transmute-fat-pointers.rs:22:14
11+
--> $DIR/transmute-fat-pointers.rs:24:14
1212
|
1313
LL | unsafe { transmute(x) } //~ ERROR transmute called with types of different sizes
1414
| ^^^^^^^^^
@@ -17,21 +17,21 @@ LL | unsafe { transmute(x) } //~ ERROR transmute called with types of differ
1717
= note: target type: &U (pointer to U)
1818

1919
error[E0512]: transmute called with types of different sizes
20-
--> $DIR/transmute-fat-pointers.rs:34:14
20+
--> $DIR/transmute-fat-pointers.rs:36:14
2121
|
2222
LL | unsafe { transmute(x) } //~ ERROR transmute called with types of different sizes
2323
| ^^^^^^^^^
2424
|
2525
= note: source type: &T (pointer to T)
26-
= note: target type: &U (64 bits)
26+
= note: target type: &U (N bits)
2727

2828
error[E0512]: transmute called with types of different sizes
29-
--> $DIR/transmute-fat-pointers.rs:38:14
29+
--> $DIR/transmute-fat-pointers.rs:40:14
3030
|
3131
LL | unsafe { transmute(x) } //~ ERROR transmute called with types of different sizes
3232
| ^^^^^^^^^
3333
|
34-
= note: source type: &T (64 bits)
34+
= note: source type: &T (N bits)
3535
= note: target type: &U (pointer to U)
3636

3737
error: aborting due to 4 previous errors

src/test/ui/transmute/transmute-impl.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// normalize-stderr-test "\d+ bits" -> "N bits"
12+
1113
// Tests that are conservative around thin/fat pointer mismatches.
1214

1315
#![allow(dead_code)]

src/test/ui/transmute/transmute-impl.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0512]: transmute called with types of different sizes
2-
--> $DIR/transmute-impl.rs:29:18
2+
--> $DIR/transmute-impl.rs:31:18
33
|
44
LL | unsafe { transmute(x) } //~ ERROR transmute called with types of different sizes
55
| ^^^^^^^^^
66
|
77
= note: source type: &T (pointer to T)
8-
= note: target type: &isize (64 bits)
8+
= note: target type: &isize (N bits)
99

1010
error: aborting due to previous error
1111

src/test/ui/union-ub-fat-ptr.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// normalize-stderr-test "alignment \d+" -> "alignment N"
12+
// normalize-stderr-test "offset \d+" -> "offset N"
13+
// normalize-stderr-test "allocation \d+" -> "allocation N"
14+
// normalize-stderr-test "size \d+" -> "size N"
15+
1116
#[repr(C)]
1217
#[derive(Copy, Clone)]
1318
struct SliceRepr {

src/test/ui/union-ub-fat-ptr.stderr

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
error[E0080]: this constant likely exhibits undefined behavior
2-
--> $DIR/union-ub-fat-ptr.rs:67:1
2+
--> $DIR/union-ub-fat-ptr.rs:72:1
33
|
44
LL | const C: &str = unsafe { SliceTransmute { bad: BadSliceRepr { ptr: &42, len: &3 } }.str};
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered length is not a valid integer
66
|
77
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
88

99
error[E0080]: this constant likely exhibits undefined behavior
10-
--> $DIR/union-ub-fat-ptr.rs:75:1
10+
--> $DIR/union-ub-fat-ptr.rs:80:1
1111
|
1212
LL | const C2: &[u8] = unsafe { SliceTransmute { bad: BadSliceRepr { ptr: &42, len: &3 } }.slice};
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered length is not a valid integer
1414
|
1515
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
1616

1717
error[E0080]: this constant likely exhibits undefined behavior
18-
--> $DIR/union-ub-fat-ptr.rs:79:1
18+
--> $DIR/union-ub-fat-ptr.rs:84:1
1919
|
2020
LL | const D: &Trait = unsafe { DynTransmute { repr: DynRepr { ptr: &92, vtable: &3 } }.rust};
21-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tried to access memory with alignment 1, but alignment 8 is required
21+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tried to access memory with alignment N, but alignment N is required
2222
|
2323
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
2424

2525
error[E0080]: this constant likely exhibits undefined behavior
26-
--> $DIR/union-ub-fat-ptr.rs:82:1
26+
--> $DIR/union-ub-fat-ptr.rs:87:1
2727
|
2828
LL | const E: &Trait = unsafe { DynTransmute { repr2: DynRepr2 { ptr: &92, vtable: &3 } }.rust};
29-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access at offset 16, outside bounds of allocation 56 which has size 8
29+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access at offset N, outside bounds of allocation N which has size N
3030
|
3131
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
3232

3333
error[E0080]: this constant likely exhibits undefined behavior
34-
--> $DIR/union-ub-fat-ptr.rs:85:1
34+
--> $DIR/union-ub-fat-ptr.rs:90:1
3535
|
3636
LL | const F: &Trait = unsafe { DynTransmute { bad: BadDynRepr { ptr: &92, vtable: 3 } }.rust};
3737
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered vtable address is not a pointer

0 commit comments

Comments
 (0)