diff options
Diffstat (limited to 'tests/ui/sanitizer/cfi-async-closures.rs')
| -rw-r--r-- | tests/ui/sanitizer/cfi-async-closures.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/ui/sanitizer/cfi-async-closures.rs b/tests/ui/sanitizer/cfi-async-closures.rs index 50edeb852bd..d94f2992d84 100644 --- a/tests/ui/sanitizer/cfi-async-closures.rs +++ b/tests/ui/sanitizer/cfi-async-closures.rs @@ -10,6 +10,7 @@ //@ [cfi] compile-flags: -C codegen-units=1 -C lto -C prefer-dynamic=off -C opt-level=0 //@ [cfi] compile-flags: -Z sanitizer=cfi //@ [kcfi] compile-flags: -Z sanitizer=kcfi +//@ [kcfi] compile-flags: -C panic=abort -Z panic-abort-tests -C prefer-dynamic=off //@ run-pass #![feature(async_closure)] @@ -27,4 +28,6 @@ fn main() { let f = identity(async || ()); let _ = f.async_call(()); let _ = f(); + let g: Box<dyn FnOnce() -> _> = Box::new(f) as _; + let _ = g(); } |
