File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 11#![ feature( const_transmute) ]
22
3+ // normalize-stderr-64bit "64 bits" -> "word size"
4+ // normalize-stderr-32bit "32 bits" -> "word size"
5+ // normalize-stderr-64bit "128 bits" -> "2 * word size"
6+ // normalize-stderr-32bit "64 bits" -> "2 * word size"
7+
38fn main ( ) {
49 match & b"" [ ..] {
5- ZST => { }
6- //~^ ERROR could not evaluate constant pattern
10+ ZST => { } //~ ERROR could not evaluate constant pattern
711 }
812}
913
Original file line number Diff line number Diff line change 11error: any use of this value will cause an error
2- --> $DIR/transmute-size-mismatch-before-typeck.rs:10 :29
2+ --> $DIR/transmute-size-mismatch-before-typeck.rs:14 :29
33 |
44LL | const ZST: &[u8] = unsafe { std::mem::transmute(1usize) };
55 | ----------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^---
@@ -9,19 +9,19 @@ LL | const ZST: &[u8] = unsafe { std::mem::transmute(1usize) };
99 = note: `#[deny(const_err)]` on by default
1010
1111error: could not evaluate constant pattern
12- --> $DIR/transmute-size-mismatch-before-typeck.rs:5 :9
12+ --> $DIR/transmute-size-mismatch-before-typeck.rs:10 :9
1313 |
1414LL | ZST => {}
1515 | ^^^
1616
1717error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
18- --> $DIR/transmute-size-mismatch-before-typeck.rs:10 :29
18+ --> $DIR/transmute-size-mismatch-before-typeck.rs:14 :29
1919 |
2020LL | const ZST: &[u8] = unsafe { std::mem::transmute(1usize) };
2121 | ^^^^^^^^^^^^^^^^^^^
2222 |
23- = note: source type: `usize` (64 bits )
24- = note: target type: `&'static [u8]` (128 bits )
23+ = note: source type: `usize` (word size )
24+ = note: target type: `&'static [u8]` (2 * word size )
2525
2626error: aborting due to 3 previous errors
2727
You can’t perform that action at this time.
0 commit comments