parent
f3f2e697d8
commit
caa321ab7d
2 changed files with 33 additions and 1 deletions
|
|
@ -940,7 +940,7 @@ pub fn invoke<'a>(
|
|||
}
|
||||
}
|
||||
|
||||
if bcx.fcx.needs_invoke() {
|
||||
if need_invoke(bcx) {
|
||||
unsafe {
|
||||
debug!("invoking {} at {}", llfn, bcx.llbb);
|
||||
for &llarg in llargs.iter() {
|
||||
|
|
|
|||
32
src/test/run-pass/no-landing-pads.rs
Normal file
32
src/test/run-pass/no-landing-pads.rs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
// 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.
|
||||
|
||||
// compile-flags: -Z no-landing-pads
|
||||
// xfail-fast
|
||||
|
||||
use std::task;
|
||||
|
||||
static mut HIT: bool = false;
|
||||
|
||||
struct A;
|
||||
|
||||
impl Drop for A {
|
||||
fn drop(&mut self) {
|
||||
unsafe { HIT = true; }
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
do task::try::<()> {
|
||||
let _a = A;
|
||||
fail!();
|
||||
};
|
||||
assert!(unsafe { !HIT });
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue