rust/tests/rustdoc-ui/const-evalutation-ice.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
228 B
Rust
Raw Normal View History

2018-09-19 02:30:25 -05:00
// Just check we don't get an ICE for `N`.
2018-01-29 16:04:43 -06:00
use std::cell::Cell;
use std::mem;
pub struct S {
s: Cell<usize>
}
pub const N: usize = 0 - (mem::size_of::<S>() != 400) as usize;
//~^ ERROR evaluation of constant value failed