File tree 2 files changed +33
-1
lines changed
2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -940,7 +940,7 @@ pub fn invoke<'a>(
940
940
}
941
941
}
942
942
943
- if bcx . fcx . needs_invoke ( ) {
943
+ if need_invoke ( bcx ) {
944
944
unsafe {
945
945
debug ! ( "invoking {} at {}" , llfn, bcx. llbb) ;
946
946
for & llarg in llargs. iter ( ) {
Original file line number Diff line number Diff line change
1
+ // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ // compile-flags: -Z no-landing-pads
12
+ // xfail-fast
13
+
14
+ use std:: task;
15
+
16
+ static mut HIT : bool = false ;
17
+
18
+ struct A ;
19
+
20
+ impl Drop for A {
21
+ fn drop ( & mut self ) {
22
+ unsafe { HIT = true ; }
23
+ }
24
+ }
25
+
26
+ fn main ( ) {
27
+ do task:: try:: < ( ) > {
28
+ let _a = A ;
29
+ fail ! ( ) ;
30
+ } ;
31
+ assert ! ( unsafe { !HIT } ) ;
32
+ }
You can’t perform that action at this time.
0 commit comments