Files
rust/tests/ui/panic-handler/panic-handler-with-target-feature.stderr
Obei Sideg 74830a7fcb Move check_target_feature into the attribute parser
Use `TargetFeatureParser` to reject `#[target_feature]` on functions
marked as lang items (via `#[lang = "..."]` or `#[panic_handler]`),
replacing `check_target_feature` in `rustc_passes`.
2026-06-27 11:26:41 +03:00

14 lines
426 B
Plaintext

error: `#[target_feature]` cannot be applied to a `#[panic_handler]` function
--> $DIR/panic-handler-with-target-feature.rs:10:1
|
LL | #[target_feature(enable = "avx2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | / fn panic(info: &PanicInfo) -> ! {
LL | | unimplemented!();
LL | | }
| |_- `#[panic_handler]` function is not allowed to have `#[target_feature]`
error: aborting due to 1 previous error