commit
213c905cad
@ -1 +1 @@
|
||||
53ac4f8e2fc15e49ef3a04f98622a9b9db755fd4
|
||||
3128fd8ddfde44f09f7c3920c552122f5aec2395
|
||||
|
@ -4,6 +4,12 @@ error[E0080]: evaluation of constant value failed
|
||||
LL | ptr.read();
|
||||
| ^^^^^^^^^^ accessing memory with alignment ALIGN, but alignment ALIGN is required
|
||||
|
||||
note: erroneous constant used
|
||||
--> $DIR/const-ub-checks.rs:LL:CC
|
||||
|
|
||||
LL | let _x = UNALIGNED_READ;
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
|
@ -4,6 +4,20 @@ error[E0080]: evaluation of constant value failed
|
||||
LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
|
||||
| ^^^^^ attempt to compute `5_u32 - 6_u32`, which would overflow
|
||||
|
||||
note: erroneous constant used
|
||||
--> $DIR/erroneous_const2.rs:LL:CC
|
||||
|
|
||||
LL | println!("{}", FOO);
|
||||
| ^^^
|
||||
|
||||
note: erroneous constant used
|
||||
--> $DIR/erroneous_const2.rs:LL:CC
|
||||
|
|
||||
LL | println!("{}", FOO);
|
||||
| ^^^
|
||||
|
|
||||
= note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
|
Loading…
x
Reference in New Issue
Block a user