Rollup merge of #52058 - davidtwco:issue-51345, r=nikomatsakis
Use of unimplemented!() causing ICE with NLL Fixes #51345. r? @nikomatsakis
This commit is contained in:
commit
b71b92199c
4 changed files with 70 additions and 41 deletions
18
src/test/run-fail/issue-51345.rs
Normal file
18
src/test/run-fail/issue-51345.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
// Copyright 2012 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.
|
||||
|
||||
// error-pattern: thread 'main' panicked at 'explicit panic'
|
||||
|
||||
#![feature(nll)]
|
||||
|
||||
fn main() {
|
||||
let mut vec = vec![];
|
||||
vec.push((vec.len(), panic!()));
|
||||
}
|
||||
17
src/test/run-pass/issue-51345.rs
Normal file
17
src/test/run-pass/issue-51345.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2012 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.
|
||||
|
||||
#![feature(nll)]
|
||||
|
||||
fn main() {
|
||||
let mut v = Vec::new();
|
||||
|
||||
loop { v.push(break) }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue