File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -397,7 +397,7 @@ lint_incomplete_include =
397
397
398
398
lint_inner_macro_attribute_unstable = inner macro attributes are unstable
399
399
400
- lint_invalid_asm_label_binary = avoid using labels containing only the digits 0 and 1 in inline assembly
400
+ lint_invalid_asm_label_binary = avoid using labels containing only the digits `0` and `1` in inline assembly
401
401
.help = use a different number that has at least one digit 2 or greater
402
402
.note = an LLVM bug makes these labels ambiguous with a binary literal number
403
403
.note = see <https://bugs.llvm.org/show_bug.cgi?id=36144> for more information
Original file line number Diff line number Diff line change @@ -2903,10 +2903,10 @@ impl<'tcx> LateLintPass<'tcx> for AsmLabels {
2903
2903
in_bracket = true ;
2904
2904
label_kind = AsmLabelKind :: FormatArg ;
2905
2905
} else if matches ! ( start, '0' | '1' ) {
2906
- // binary labels have only the characters 0 or 1
2906
+ // Binary labels have only the characters `0` or `1`.
2907
2907
label_kind = AsmLabelKind :: Binary ;
2908
2908
} else if !( start. is_ascii_alphabetic ( ) || matches ! ( start, '.' | '_' ) ) {
2909
- // named labels start with ASCII letters or . or _
2909
+ // Named labels start with ASCII letters, `.` or `_`.
2910
2910
// anything else is not a label
2911
2911
break ' label_loop;
2912
2912
}
@@ -2934,7 +2934,7 @@ impl<'tcx> LateLintPass<'tcx> for AsmLabels {
2934
2934
label_kind = AsmLabelKind :: FormatArg ;
2935
2935
} else {
2936
2936
let can_continue = match label_kind {
2937
- // format arg labels are considered to be named labels for the purposes
2937
+ // Format arg labels are considered to be named labels for the purposes
2938
2938
// of continuing outside of their {} pair.
2939
2939
AsmLabelKind :: Named | AsmLabelKind :: FormatArg => {
2940
2940
c. is_ascii_alphanumeric ( ) || matches ! ( c, '_' | '$' )
You can’t perform that action at this time.
0 commit comments