! { loop {} }...">

#[target_feature] is allowed on #[panic_handler] with target_feature 1.1 · Issue #109411 · rust-lang/rust (original) (raw)

This works (but it shouldn't):

#![feature(target_feature_11)] #![no_std]

use core::panic::PanicInfo;

#[panic_handler] #[target_feature(enable = "avx2")] fn panic(_info: &PanicInfo) -> ! { loop {} }

similar to #108645 , cc #69098 (tracking issue)

@rustbot label T-lang T-compiler C-bug I-unsound F-target_feature_11