Test
This commit is contained in:
parent
04dd61d1ec
commit
9af15e3a6b
1 changed files with 21 additions and 0 deletions
21
src/test/run-pass/issue-18353.rs
Normal file
21
src/test/run-pass/issue-18353.rs
Normal file
|
@ -0,0 +1,21 @@
|
|||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// Test that wrapping an unsized struct in an enum which gets optimised does
|
||||
// not ICE.
|
||||
|
||||
struct Str {
|
||||
f: [u8]
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let str: Option<&Str> = None;
|
||||
str.is_some();
|
||||
}
|
Loading…
Add table
Reference in a new issue