diff options
Diffstat (limited to 'src/test/rustdoc/const-evalutation-ice.rs')
-rw-r--r-- | src/test/rustdoc/const-evalutation-ice.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/rustdoc/const-evalutation-ice.rs b/src/test/rustdoc/const-evalutation-ice.rs new file mode 100644 index 000000000..68c7f9c56 --- /dev/null +++ b/src/test/rustdoc/const-evalutation-ice.rs @@ -0,0 +1,10 @@ +// Just check we don't get an ICE for `N`. + +use std::cell::Cell; +use std::mem; + +pub struct S { + s: Cell<usize> +} + +pub const N: usize = 0 - (mem::size_of::<S>() != 4) as usize; |