]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/dealloc-no-unwind.rs
Suggest defining type parameter when appropriate
[rust.git] / src / test / codegen / dealloc-no-unwind.rs
1 //
2 // no-system-llvm
3 // compile-flags: -O
4
5 #![crate_type="lib"]
6
7 struct A;
8
9 impl Drop for A {
10     fn drop(&mut self) {
11         extern { fn foo(); }
12         unsafe { foo(); }
13     }
14 }
15
16 #[no_mangle]
17 pub fn a(a: Box<i32>) {
18     // CHECK-LABEL: define void @a
19     // CHECK: call void @__rust_dealloc
20     // CHECK-NEXT: call void @foo
21     let _a = A;
22     drop(a);
23 }