This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +8
-6
lines changed
rfcs/rfc-2091-track-caller Expand file tree Collapse file tree 5 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -484,7 +484,7 @@ passes_naked_functions_asm_options =
484484
485485passes_naked_functions_incompatible_attribute =
486486 attribute incompatible with `#[naked]`
487- .label = this attribute is incompatible with `#[naked]`
487+ .label = the ` { $attr } ` attribute is incompatible with `#[naked]`
488488 .naked_attribute = function marked with `#[naked]` here
489489
490490passes_naked_functions_must_use_noreturn =
Original file line number Diff line number Diff line change @@ -461,6 +461,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
461461 self . dcx ( ) . emit_err ( errors:: NakedFunctionIncompatibleAttribute {
462462 span : other_attr. span ,
463463 naked_span : attr. span ,
464+ attr : other_attr. name_or_empty ( ) ,
464465 } ) ;
465466
466467 return false ;
Original file line number Diff line number Diff line change @@ -1190,6 +1190,7 @@ pub struct NakedFunctionIncompatibleAttribute {
11901190 pub span : Span ,
11911191 #[ label( passes_naked_attribute) ]
11921192 pub naked_span : Span ,
1193+ pub attr : Symbol ,
11931194}
11941195
11951196#[ derive( Diagnostic ) ]
Original file line number Diff line number Diff line change @@ -4,23 +4,23 @@ error[E0736]: attribute incompatible with `#[naked]`
44LL | #[naked]
55 | -------- function marked with `#[naked]` here
66LL | #[inline]
7- | ^^^^^^^^^ this attribute is incompatible with `#[naked]`
7+ | ^^^^^^^^^ the `inline` attribute is incompatible with `#[naked]`
88
99error[E0736]: attribute incompatible with `#[naked]`
1010 --> $DIR/naked-functions-inline.rs:20:1
1111 |
1212LL | #[naked]
1313 | -------- function marked with `#[naked]` here
1414LL | #[inline(always)]
15- | ^^^^^^^^^^^^^^^^^ this attribute is incompatible with `#[naked]`
15+ | ^^^^^^^^^^^^^^^^^ the `inline` attribute is incompatible with `#[naked]`
1616
1717error[E0736]: attribute incompatible with `#[naked]`
1818 --> $DIR/naked-functions-inline.rs:27:1
1919 |
2020LL | #[naked]
2121 | -------- function marked with `#[naked]` here
2222LL | #[inline(never)]
23- | ^^^^^^^^^^^^^^^^ this attribute is incompatible with `#[naked]`
23+ | ^^^^^^^^^^^^^^^^ the `inline` attribute is incompatible with `#[naked]`
2424
2525error: aborting due to 3 previous errors
2626
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ error[E0736]: attribute incompatible with `#[naked]`
22 --> $DIR/error-with-naked.rs:6:1
33 |
44LL | #[track_caller]
5- | ^^^^^^^^^^^^^^^ this attribute is incompatible with `#[naked]`
5+ | ^^^^^^^^^^^^^^^ the `track_caller` attribute is incompatible with `#[naked]`
66LL |
77LL | #[naked]
88 | -------- function marked with `#[naked]` here
@@ -11,7 +11,7 @@ error[E0736]: attribute incompatible with `#[naked]`
1111 --> $DIR/error-with-naked.rs:18:5
1212 |
1313LL | #[track_caller]
14- | ^^^^^^^^^^^^^^^ this attribute is incompatible with `#[naked]`
14+ | ^^^^^^^^^^^^^^^ the `track_caller` attribute is incompatible with `#[naked]`
1515LL |
1616LL | #[naked]
1717 | -------- function marked with `#[naked]` here
You can’t perform that action at this time.
0 commit comments