File tree 5 files changed +8
-6
lines changed
rfcs/rfc-2091-track-caller
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 =
484
484
485
485
passes_naked_functions_incompatible_attribute =
486
486
attribute incompatible with `#[naked]`
487
- .label = this attribute is incompatible with `#[naked]`
487
+ .label = the ` { $attr } ` attribute is incompatible with `#[naked]`
488
488
.naked_attribute = function marked with `#[naked]` here
489
489
490
490
passes_naked_functions_must_use_noreturn =
Original file line number Diff line number Diff line change @@ -461,6 +461,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
461
461
self . dcx ( ) . emit_err ( errors:: NakedFunctionIncompatibleAttribute {
462
462
span : other_attr. span ,
463
463
naked_span : attr. span ,
464
+ attr : other_attr. name_or_empty ( ) ,
464
465
} ) ;
465
466
466
467
return false ;
Original file line number Diff line number Diff line change @@ -1190,6 +1190,7 @@ pub struct NakedFunctionIncompatibleAttribute {
1190
1190
pub span : Span ,
1191
1191
#[ label( passes_naked_attribute) ]
1192
1192
pub naked_span : Span ,
1193
+ pub attr : Symbol ,
1193
1194
}
1194
1195
1195
1196
#[ derive( Diagnostic ) ]
Original file line number Diff line number Diff line change @@ -4,23 +4,23 @@ error[E0736]: attribute incompatible with `#[naked]`
4
4
LL | #[naked]
5
5
| -------- function marked with `#[naked]` here
6
6
LL | #[inline]
7
- | ^^^^^^^^^ this attribute is incompatible with `#[naked]`
7
+ | ^^^^^^^^^ the `inline` attribute is incompatible with `#[naked]`
8
8
9
9
error[E0736]: attribute incompatible with `#[naked]`
10
10
--> $DIR/naked-functions-inline.rs:20:1
11
11
|
12
12
LL | #[naked]
13
13
| -------- function marked with `#[naked]` here
14
14
LL | #[inline(always)]
15
- | ^^^^^^^^^^^^^^^^^ this attribute is incompatible with `#[naked]`
15
+ | ^^^^^^^^^^^^^^^^^ the `inline` attribute is incompatible with `#[naked]`
16
16
17
17
error[E0736]: attribute incompatible with `#[naked]`
18
18
--> $DIR/naked-functions-inline.rs:27:1
19
19
|
20
20
LL | #[naked]
21
21
| -------- function marked with `#[naked]` here
22
22
LL | #[inline(never)]
23
- | ^^^^^^^^^^^^^^^^ this attribute is incompatible with `#[naked]`
23
+ | ^^^^^^^^^^^^^^^^ the `inline` attribute is incompatible with `#[naked]`
24
24
25
25
error: aborting due to 3 previous errors
26
26
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ error[E0736]: attribute incompatible with `#[naked]`
2
2
--> $DIR/error-with-naked.rs:6:1
3
3
|
4
4
LL | #[track_caller]
5
- | ^^^^^^^^^^^^^^^ this attribute is incompatible with `#[naked]`
5
+ | ^^^^^^^^^^^^^^^ the `track_caller` attribute is incompatible with `#[naked]`
6
6
LL |
7
7
LL | #[naked]
8
8
| -------- function marked with `#[naked]` here
@@ -11,7 +11,7 @@ error[E0736]: attribute incompatible with `#[naked]`
11
11
--> $DIR/error-with-naked.rs:18:5
12
12
|
13
13
LL | #[track_caller]
14
- | ^^^^^^^^^^^^^^^ this attribute is incompatible with `#[naked]`
14
+ | ^^^^^^^^^^^^^^^ the `track_caller` attribute is incompatible with `#[naked]`
15
15
LL |
16
16
LL | #[naked]
17
17
| -------- function marked with `#[naked]` here
You can’t perform that action at this time.
0 commit comments