Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
22
tests/codegen/dealloc-no-unwind.rs
Normal file
22
tests/codegen/dealloc-no-unwind.rs
Normal file
|
@ -0,0 +1,22 @@
|
|||
// no-system-llvm
|
||||
// compile-flags: -O
|
||||
|
||||
#![crate_type="lib"]
|
||||
|
||||
struct A;
|
||||
|
||||
impl Drop for A {
|
||||
fn drop(&mut self) {
|
||||
extern "C" { fn foo(); }
|
||||
unsafe { foo(); }
|
||||
}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub fn a(a: Box<i32>) {
|
||||
// CHECK-LABEL: define{{.*}}void @a
|
||||
// CHECK: call void @__rust_dealloc
|
||||
// CHECK-NEXT: call void @foo
|
||||
let _a = A;
|
||||
drop(a);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue