Update rustdoc test to check its error output
This commit is contained in:
parent
06693790ce
commit
b5a9f6a537
2 changed files with 11 additions and 1 deletions
|
@ -7,4 +7,5 @@ pub struct S {
|
|||
s: Cell<usize>
|
||||
}
|
||||
|
||||
pub const N: usize = 0 - (mem::size_of::<S>() != 4) as usize;
|
||||
pub const N: usize = 0 - (mem::size_of::<S>() != 400) as usize;
|
||||
//~^ ERROR evaluation of constant value failed
|
9
src/test/rustdoc-ui/const-evalutation-ice.stderr
Normal file
9
src/test/rustdoc-ui/const-evalutation-ice.stderr
Normal file
|
@ -0,0 +1,9 @@
|
|||
error[E0080]: evaluation of constant value failed
|
||||
--> $DIR/const-evalutation-ice.rs:10:22
|
||||
|
|
||||
LL | pub const N: usize = 0 - (mem::size_of::<S>() != 400) as usize;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to compute `0_usize - 1_usize`, which would overflow
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0080`.
|
Loading…
Add table
Reference in a new issue