mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Simplify or delete normalize directives that don't care about bit-width
This commit is contained in:
parent
917bfa7847
commit
d997bc998e
@ -1,6 +1,5 @@
|
||||
// ignore-tidy-linelength
|
||||
//@ normalize-stderr-32bit: "values of the type `[^`]+` are too big" -> "values of the type $$REALLY_TOO_BIG are too big"
|
||||
//@ normalize-stderr-64bit: "values of the type `[^`]+` are too big" -> "values of the type $$REALLY_TOO_BIG are too big"
|
||||
//@ normalize-stderr-test: "values of the type `[^`]+` are too big" -> "values of the type $$REALLY_TOO_BIG are too big"
|
||||
|
||||
|
||||
#![feature(transmute_generic_consts)]
|
||||
|
@ -1,11 +1,11 @@
|
||||
error: the constant `W` is not of type `usize`
|
||||
--> $DIR/transmute-fail.rs:17:42
|
||||
--> $DIR/transmute-fail.rs:16:42
|
||||
|
|
||||
LL | fn bar<const W: bool, const H: usize>(v: [[u32; H]; W]) -> [[u32; W]; H] {
|
||||
| ^^^^^^^^^^^^^ expected `usize`, found `bool`
|
||||
|
||||
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
|
||||
--> $DIR/transmute-fail.rs:12:9
|
||||
--> $DIR/transmute-fail.rs:11:9
|
||||
|
|
||||
LL | std::mem::transmute(v)
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
@ -14,13 +14,13 @@ LL | std::mem::transmute(v)
|
||||
= note: target type: `[[u32; W + 1]; H]` (size can vary because of [u32; W + 1])
|
||||
|
||||
error: the constant `W` is not of type `usize`
|
||||
--> $DIR/transmute-fail.rs:20:9
|
||||
--> $DIR/transmute-fail.rs:19:9
|
||||
|
|
||||
LL | std::mem::transmute(v)
|
||||
| ^^^^^^^^^^^^^^^^^^^ expected `usize`, found `bool`
|
||||
|
||||
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
|
||||
--> $DIR/transmute-fail.rs:27:9
|
||||
--> $DIR/transmute-fail.rs:26:9
|
||||
|
|
||||
LL | std::mem::transmute(v)
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
@ -29,7 +29,7 @@ LL | std::mem::transmute(v)
|
||||
= note: target type: `[u32; W * H * H]` (this type does not have a fixed size)
|
||||
|
||||
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
|
||||
--> $DIR/transmute-fail.rs:34:9
|
||||
--> $DIR/transmute-fail.rs:33:9
|
||||
|
|
||||
LL | std::mem::transmute(v)
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
@ -38,7 +38,7 @@ LL | std::mem::transmute(v)
|
||||
= note: target type: `[[[u32; 9999999]; 777777777]; 8888888]` (values of the type $REALLY_TOO_BIG are too big for the target architecture)
|
||||
|
||||
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
|
||||
--> $DIR/transmute-fail.rs:40:14
|
||||
--> $DIR/transmute-fail.rs:39:14
|
||||
|
|
||||
LL | unsafe { std::mem::transmute(v) }
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
@ -47,7 +47,7 @@ LL | unsafe { std::mem::transmute(v) }
|
||||
= note: target type: `[[[u32; 9999999]; 777777777]; 239]` (values of the type $REALLY_TOO_BIG are too big for the target architecture)
|
||||
|
||||
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
|
||||
--> $DIR/transmute-fail.rs:46:9
|
||||
--> $DIR/transmute-fail.rs:45:9
|
||||
|
|
||||
LL | std::mem::transmute(v)
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
@ -56,7 +56,7 @@ LL | std::mem::transmute(v)
|
||||
= note: target type: `[[u32; W]; H]` (size can vary because of [u32; W])
|
||||
|
||||
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
|
||||
--> $DIR/transmute-fail.rs:57:9
|
||||
--> $DIR/transmute-fail.rs:56:9
|
||||
|
|
||||
LL | std::mem::transmute(v)
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
@ -65,7 +65,7 @@ LL | std::mem::transmute(v)
|
||||
= note: target type: `[u32; W * H]` (this type does not have a fixed size)
|
||||
|
||||
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
|
||||
--> $DIR/transmute-fail.rs:64:9
|
||||
--> $DIR/transmute-fail.rs:63:9
|
||||
|
|
||||
LL | std::mem::transmute(v)
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
@ -74,7 +74,7 @@ LL | std::mem::transmute(v)
|
||||
= note: target type: `[[u32; W]; H]` (size can vary because of [u32; W])
|
||||
|
||||
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
|
||||
--> $DIR/transmute-fail.rs:73:9
|
||||
--> $DIR/transmute-fail.rs:72:9
|
||||
|
|
||||
LL | std::mem::transmute(v)
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
@ -83,7 +83,7 @@ LL | std::mem::transmute(v)
|
||||
= note: target type: `[u32; D * W * H]` (this type does not have a fixed size)
|
||||
|
||||
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
|
||||
--> $DIR/transmute-fail.rs:82:9
|
||||
--> $DIR/transmute-fail.rs:81:9
|
||||
|
|
||||
LL | std::mem::transmute(v)
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
@ -92,7 +92,7 @@ LL | std::mem::transmute(v)
|
||||
= note: target type: `[[u32; D * W]; H]` (size can vary because of [u32; D * W])
|
||||
|
||||
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
|
||||
--> $DIR/transmute-fail.rs:89:9
|
||||
--> $DIR/transmute-fail.rs:88:9
|
||||
|
|
||||
LL | std::mem::transmute(v)
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
@ -101,7 +101,7 @@ LL | std::mem::transmute(v)
|
||||
= note: target type: `[u8; L * 2]` (this type does not have a fixed size)
|
||||
|
||||
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
|
||||
--> $DIR/transmute-fail.rs:96:9
|
||||
--> $DIR/transmute-fail.rs:95:9
|
||||
|
|
||||
LL | std::mem::transmute(v)
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
@ -110,7 +110,7 @@ LL | std::mem::transmute(v)
|
||||
= note: target type: `[u16; L]` (this type does not have a fixed size)
|
||||
|
||||
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
|
||||
--> $DIR/transmute-fail.rs:103:9
|
||||
--> $DIR/transmute-fail.rs:102:9
|
||||
|
|
||||
LL | std::mem::transmute(v)
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
@ -119,7 +119,7 @@ LL | std::mem::transmute(v)
|
||||
= note: target type: `[[u8; 1]; L]` (this type does not have a fixed size)
|
||||
|
||||
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
|
||||
--> $DIR/transmute-fail.rs:112:9
|
||||
--> $DIR/transmute-fail.rs:111:9
|
||||
|
|
||||
LL | std::mem::transmute(v)
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ normalize-stderr-32bit: "\(size: \d+, align: \d+\)" -> "(size: $$PTR, align: $$PTR)"
|
||||
//@ normalize-stderr-64bit: "\(size: \d+, align: \d+\)" -> "(size: $$PTR, align: $$PTR)"
|
||||
//@ normalize-stderr-test: "\(size: \d+, align: \d+\)" -> "(size: $$PTR, align: $$PTR)"
|
||||
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
|
||||
|
||||
#![allow(static_mut_refs)]
|
||||
|
@ -1,11 +1,11 @@
|
||||
error[E0764]: mutable references are not allowed in the final value of constants
|
||||
--> $DIR/issue-17718-const-bad-values.rs:7:34
|
||||
--> $DIR/issue-17718-const-bad-values.rs:6:34
|
||||
|
|
||||
LL | const C1: &'static mut [usize] = &mut [];
|
||||
| ^^^^^^^
|
||||
|
||||
error[E0080]: it is undefined behavior to use this value
|
||||
--> $DIR/issue-17718-const-bad-values.rs:11:1
|
||||
--> $DIR/issue-17718-const-bad-values.rs:10:1
|
||||
|
|
||||
LL | const C2: &'static mut i32 = unsafe { &mut S };
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const`
|
||||
|
@ -4,8 +4,6 @@
|
||||
//@ compile-flags:-C debuginfo=2
|
||||
//@ build-fail
|
||||
//@ error-pattern: too big for the target architecture
|
||||
//@ normalize-stderr-64bit: "18446744073709551615" -> "SIZE"
|
||||
//@ normalize-stderr-32bit: "4294967295" -> "SIZE"
|
||||
|
||||
#![crate_type = "rlib"]
|
||||
|
||||
|
@ -6,8 +6,6 @@
|
||||
//@ compile-flags:-C debuginfo=2
|
||||
//@ build-fail
|
||||
//@ error-pattern: too big for the target architecture
|
||||
//@ normalize-stderr-64bit: "18446744073709551615" -> "SIZE"
|
||||
//@ normalize-stderr-32bit: "4294967295" -> "SIZE"
|
||||
|
||||
#![crate_type = "rlib"]
|
||||
|
||||
|
@ -2,8 +2,7 @@
|
||||
//@ build-fail
|
||||
//@ normalize-stderr-test: "S32" -> "SXX"
|
||||
//@ normalize-stderr-test: "S1M" -> "SXX"
|
||||
//@ normalize-stderr-32bit: "values of the type `[^`]+` are too big" -> "values of the type $$REALLY_TOO_BIG are too big"
|
||||
//@ normalize-stderr-64bit: "values of the type `[^`]+` are too big" -> "values of the type $$REALLY_TOO_BIG are too big"
|
||||
//@ normalize-stderr-test: "values of the type `[^`]+` are too big" -> "values of the type $$REALLY_TOO_BIG are too big"
|
||||
|
||||
struct S32<T> {
|
||||
v0: T,
|
||||
|
@ -1,5 +1,5 @@
|
||||
error: values of the type $REALLY_TOO_BIG are too big for the target architecture
|
||||
--> $DIR/huge-struct.rs:48:9
|
||||
--> $DIR/huge-struct.rs:47:9
|
||||
|
|
||||
LL | let fat: Option<SXX<SXX<SXX<u32>>>> = None;
|
||||
| ^^^
|
||||
|
@ -1,6 +1,4 @@
|
||||
//@ build-fail
|
||||
//@ normalize-stderr-64bit: "18446744073709551615" -> "SIZE"
|
||||
//@ normalize-stderr-32bit: "4294967295" -> "SIZE"
|
||||
|
||||
//@ error-pattern: are too big for the target architecture
|
||||
fn main() {
|
||||
|
@ -6,7 +6,7 @@ error[E0080]: evaluation of constant value failed
|
||||
note: inside `std::mem::size_of::<[u8; usize::MAX]>`
|
||||
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
||||
note: inside `main`
|
||||
--> $DIR/issue-55878.rs:7:26
|
||||
--> $DIR/issue-55878.rs:5:26
|
||||
|
|
||||
LL | println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
Loading…
Reference in New Issue
Block a user