Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Test
  • Loading branch information
nrc committed Nov 5, 2014
1 parent 04dd61d commit 9af15e3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/test/run-pass/issue-18353.rs
@@ -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();
}

4 comments on commit 9af15e3

@bors
Copy link
Contributor

@bors bors commented on 9af15e3 Nov 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from bkoropoff
at nrc@9af15e3

@bors
Copy link
Contributor

@bors bors commented on 9af15e3 Nov 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging nick29581/rust/dst-bug-str = 9af15e3 into auto

@bors
Copy link
Contributor

@bors bors commented on 9af15e3 Nov 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nick29581/rust/dst-bug-str = 9af15e3 merged ok, testing candidate = b1c4a54a

@bors
Copy link
Contributor

@bors bors commented on 9af15e3 Nov 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.