diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/panic-handler/panic-handler-with-target-feature.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/panic-handler/panic-handler-with-target-feature.rs b/tests/ui/panic-handler/panic-handler-with-target-feature.rs new file mode 100644 index 000000000..8ea0275d7 --- /dev/null +++ b/tests/ui/panic-handler/panic-handler-with-target-feature.rs @@ -0,0 +1,15 @@ +// compile-flags:-C panic=abort +// only-x86_64 + +#![feature(target_feature_11)] +#![no_std] +#![no_main] + +use core::panic::PanicInfo; + +#[panic_handler] +#[target_feature(enable = "avx2")] +//~^ ERROR `panic_impl` language item function is not allowed to have `#[target_feature]` +fn panic(info: &PanicInfo) -> ! { + unimplemented!(); +} |