diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-18353.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-18353.rs b/src/test/ui/issues/issue-18353.rs new file mode 100644 index 000000000..3d15c9980 --- /dev/null +++ b/src/test/ui/issues/issue-18353.rs @@ -0,0 +1,15 @@ +// run-pass +#![allow(dead_code)] +// Test that wrapping an unsized struct in an enum which gets optimised does +// not ICE. + +// pretty-expanded FIXME #23616 + +struct Str { + f: [u8] +} + +fn main() { + let str: Option<&Str> = None; + let _ = str.is_some(); +} |