@@ -121,7 +121,7 @@ impl EarlyLintPass for WhileTrue {
121
121
"{}loop" ,
122
122
label. map_or_else( String :: new, |label| format!( "{}: " , label. ident, ) )
123
123
) ;
124
- cx. emit_spanned_lint (
124
+ cx. emit_span_lint (
125
125
WHILE_TRUE ,
126
126
condition_span,
127
127
BuiltinWhileTrue { suggestion : condition_span, replace } ,
@@ -162,7 +162,7 @@ impl BoxPointers {
162
162
if let GenericArgKind :: Type ( leaf_ty) = leaf. unpack ( )
163
163
&& leaf_ty. is_box ( )
164
164
{
165
- cx. emit_spanned_lint ( BOX_POINTERS , span, BuiltinBoxPointers { ty } ) ;
165
+ cx. emit_span_lint ( BOX_POINTERS , span, BuiltinBoxPointers { ty } ) ;
166
166
}
167
167
}
168
168
}
@@ -265,7 +265,7 @@ impl<'tcx> LateLintPass<'tcx> for NonShorthandFieldPatterns {
265
265
if cx. tcx . find_field_index ( ident, variant)
266
266
== Some ( cx. typeck_results ( ) . field_index ( fieldpat. hir_id ) )
267
267
{
268
- cx. emit_spanned_lint (
268
+ cx. emit_span_lint (
269
269
NON_SHORTHAND_FIELD_PATTERNS ,
270
270
fieldpat. span ,
271
271
BuiltinNonShorthandFieldPatterns {
@@ -334,7 +334,7 @@ impl UnsafeCode {
334
334
return ;
335
335
}
336
336
337
- cx. emit_spanned_lint ( UNSAFE_CODE , span, decorate) ;
337
+ cx. emit_span_lint ( UNSAFE_CODE , span, decorate) ;
338
338
}
339
339
}
340
340
@@ -509,7 +509,7 @@ impl MissingDoc {
509
509
let attrs = cx. tcx . hir ( ) . attrs ( cx. tcx . local_def_id_to_hir_id ( def_id) ) ;
510
510
let has_doc = attrs. iter ( ) . any ( has_doc) ;
511
511
if !has_doc {
512
- cx. emit_spanned_lint (
512
+ cx. emit_span_lint (
513
513
MISSING_DOCS ,
514
514
cx. tcx . def_span ( def_id) ,
515
515
BuiltinMissingDoc { article, desc } ,
@@ -710,7 +710,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingCopyImplementations {
710
710
)
711
711
. is_ok ( )
712
712
{
713
- cx. emit_spanned_lint ( MISSING_COPY_IMPLEMENTATIONS , item. span , BuiltinMissingCopyImpl ) ;
713
+ cx. emit_span_lint ( MISSING_COPY_IMPLEMENTATIONS , item. span , BuiltinMissingCopyImpl ) ;
714
714
}
715
715
}
716
716
}
@@ -795,7 +795,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingDebugImplementations {
795
795
. next ( )
796
796
. is_some ( ) ;
797
797
if !has_impl {
798
- cx. emit_spanned_lint (
798
+ cx. emit_span_lint (
799
799
MISSING_DEBUG_IMPLEMENTATIONS ,
800
800
item. span ,
801
801
BuiltinMissingDebugImpl { tcx : cx. tcx , def_id : debug } ,
@@ -874,7 +874,7 @@ impl EarlyLintPass for AnonymousParameters {
874
874
} else {
875
875
( "<type>" , Applicability :: HasPlaceholders )
876
876
} ;
877
- cx. emit_spanned_lint (
877
+ cx. emit_span_lint (
878
878
ANONYMOUS_PARAMETERS ,
879
879
arg. pat . span ,
880
880
BuiltinAnonymousParams { suggestion : ( arg. pat . span , appl) , ty_snip } ,
@@ -921,7 +921,7 @@ impl EarlyLintPass for DeprecatedAttr {
921
921
BuiltinDeprecatedAttrLinkSuggestion :: Default { suggestion : attr. span }
922
922
}
923
923
} ;
924
- cx. emit_spanned_lint (
924
+ cx. emit_span_lint (
925
925
DEPRECATED ,
926
926
attr. span ,
927
927
BuiltinDeprecatedAttrLink { name, reason, link, suggestion } ,
@@ -931,7 +931,7 @@ impl EarlyLintPass for DeprecatedAttr {
931
931
}
932
932
}
933
933
if attr. has_name ( sym:: no_start) || attr. has_name ( sym:: crate_id) {
934
- cx. emit_spanned_lint (
934
+ cx. emit_span_lint (
935
935
DEPRECATED ,
936
936
attr. span ,
937
937
BuiltinDeprecatedAttrUsed {
@@ -973,7 +973,7 @@ fn warn_if_doc(cx: &EarlyContext<'_>, node_span: Span, node_kind: &str, attrs: &
973
973
BuiltinUnusedDocCommentSub :: BlockHelp
974
974
}
975
975
} ;
976
- cx. emit_spanned_lint (
976
+ cx. emit_span_lint (
977
977
UNUSED_DOC_COMMENTS ,
978
978
span,
979
979
BuiltinUnusedDocComment { kind : node_kind, label : node_span, sub } ,
@@ -1107,7 +1107,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidNoMangleItems {
1107
1107
match param. kind {
1108
1108
GenericParamKind :: Lifetime { .. } => { }
1109
1109
GenericParamKind :: Type { .. } | GenericParamKind :: Const { .. } => {
1110
- cx. emit_spanned_lint (
1110
+ cx. emit_span_lint (
1111
1111
NO_MANGLE_GENERIC_ITEMS ,
1112
1112
span,
1113
1113
BuiltinNoMangleGeneric { suggestion : no_mangle_attr. span } ,
@@ -1138,7 +1138,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidNoMangleItems {
1138
1138
1139
1139
// Const items do not refer to a particular location in memory, and therefore
1140
1140
// don't have anything to attach a symbol to
1141
- cx. emit_spanned_lint (
1141
+ cx. emit_span_lint (
1142
1142
NO_MANGLE_CONST_ITEMS ,
1143
1143
it. span ,
1144
1144
BuiltinConstNoMangle { suggestion } ,
@@ -1201,7 +1201,7 @@ impl<'tcx> LateLintPass<'tcx> for MutableTransmutes {
1201
1201
get_transmute_from_to ( cx, expr) . map ( |( ty1, ty2) | ( ty1. kind ( ) , ty2. kind ( ) ) )
1202
1202
{
1203
1203
if from_mutbl < to_mutbl {
1204
- cx. emit_spanned_lint ( MUTABLE_TRANSMUTES , expr. span , BuiltinMutablesTransmutes ) ;
1204
+ cx. emit_span_lint ( MUTABLE_TRANSMUTES , expr. span , BuiltinMutablesTransmutes ) ;
1205
1205
}
1206
1206
}
1207
1207
@@ -1270,7 +1270,7 @@ impl<'tcx> LateLintPass<'tcx> for UnstableFeatures {
1270
1270
&& let Some ( items) = attr. meta_item_list ( )
1271
1271
{
1272
1272
for item in items {
1273
- cx. emit_spanned_lint ( UNSTABLE_FEATURES , item. span ( ) , BuiltinUnstableFeatures ) ;
1273
+ cx. emit_span_lint ( UNSTABLE_FEATURES , item. span ( ) , BuiltinUnstableFeatures ) ;
1274
1274
}
1275
1275
}
1276
1276
}
@@ -1323,7 +1323,7 @@ impl<'tcx> LateLintPass<'tcx> for UngatedAsyncFnTrackCaller {
1323
1323
// Now, check if the function has the `#[track_caller]` attribute
1324
1324
&& let Some ( attr) = cx. tcx . get_attr ( def_id, sym:: track_caller)
1325
1325
{
1326
- cx. emit_spanned_lint (
1326
+ cx. emit_span_lint (
1327
1327
UNGATED_ASYNC_FN_TRACK_CALLER ,
1328
1328
attr. span ,
1329
1329
BuiltinUngatedAsyncFnTrackCaller { label : span, session : & cx. tcx . sess } ,
@@ -1389,7 +1389,7 @@ impl UnreachablePub {
1389
1389
applicability = Applicability :: MaybeIncorrect ;
1390
1390
}
1391
1391
let def_span = cx. tcx . def_span ( def_id) ;
1392
- cx. emit_spanned_lint (
1392
+ cx. emit_span_lint (
1393
1393
UNREACHABLE_PUB ,
1394
1394
def_span,
1395
1395
BuiltinUnreachablePub {
@@ -1518,7 +1518,7 @@ impl<'tcx> LateLintPass<'tcx> for TypeAliasBounds {
1518
1518
suggested_changing_assoc_types = true ;
1519
1519
SuggestChangingAssocTypes { ty : hir_ty }
1520
1520
} ) ;
1521
- cx. emit_spanned_lint (
1521
+ cx. emit_span_lint (
1522
1522
TYPE_ALIAS_BOUNDS ,
1523
1523
where_spans,
1524
1524
BuiltinTypeAliasWhereClause {
@@ -1534,7 +1534,7 @@ impl<'tcx> LateLintPass<'tcx> for TypeAliasBounds {
1534
1534
suggested_changing_assoc_types = true ;
1535
1535
SuggestChangingAssocTypes { ty : hir_ty }
1536
1536
} ) ;
1537
- cx. emit_spanned_lint (
1537
+ cx. emit_span_lint (
1538
1538
TYPE_ALIAS_BOUNDS ,
1539
1539
inline_spans,
1540
1540
BuiltinTypeAliasGenericBounds { suggestion, sub } ,
@@ -1633,7 +1633,7 @@ impl<'tcx> LateLintPass<'tcx> for TrivialConstraints {
1633
1633
| ClauseKind :: ConstEvaluatable ( ..) => continue ,
1634
1634
} ;
1635
1635
if predicate. is_global ( ) {
1636
- cx. emit_spanned_lint (
1636
+ cx. emit_span_lint (
1637
1637
TRIVIAL_BOUNDS ,
1638
1638
span,
1639
1639
BuiltinTrivialBounds { predicate_kind_name, predicate } ,
@@ -1751,7 +1751,7 @@ impl EarlyLintPass for EllipsisInclusiveRangePatterns {
1751
1751
replace,
1752
1752
} ) ;
1753
1753
} else {
1754
- cx. emit_spanned_lint (
1754
+ cx. emit_span_lint (
1755
1755
ELLIPSIS_INCLUSIVE_RANGE_PATTERNS ,
1756
1756
pat. span ,
1757
1757
BuiltinEllipsisInclusiveRangePatternsLint :: Parenthesise {
@@ -1769,7 +1769,7 @@ impl EarlyLintPass for EllipsisInclusiveRangePatterns {
1769
1769
replace : replace. to_string ( ) ,
1770
1770
} ) ;
1771
1771
} else {
1772
- cx. emit_spanned_lint (
1772
+ cx. emit_span_lint (
1773
1773
ELLIPSIS_INCLUSIVE_RANGE_PATTERNS ,
1774
1774
join,
1775
1775
BuiltinEllipsisInclusiveRangePatternsLint :: NonParenthesise {
@@ -1895,7 +1895,7 @@ impl KeywordIdents {
1895
1895
return ;
1896
1896
}
1897
1897
1898
- cx. emit_spanned_lint (
1898
+ cx. emit_span_lint (
1899
1899
KEYWORD_IDENTS ,
1900
1900
ident. span ,
1901
1901
BuiltinKeywordIdents { kw : ident, next : next_edition, suggestion : ident. span } ,
@@ -2203,7 +2203,7 @@ impl<'tcx> LateLintPass<'tcx> for ExplicitOutlivesRequirements {
2203
2203
lint_spans. sort_unstable ( ) ;
2204
2204
lint_spans. dedup ( ) ;
2205
2205
2206
- cx. emit_spanned_lint (
2206
+ cx. emit_span_lint (
2207
2207
EXPLICIT_OUTLIVES_REQUIREMENTS ,
2208
2208
lint_spans. clone ( ) ,
2209
2209
BuiltinExplicitOutlives {
@@ -2290,13 +2290,13 @@ impl EarlyLintPass for IncompleteInternalFeatures {
2290
2290
let help =
2291
2291
HAS_MIN_FEATURES . contains ( & name) . then_some ( BuiltinIncompleteFeaturesHelp ) ;
2292
2292
2293
- cx. emit_spanned_lint (
2293
+ cx. emit_span_lint (
2294
2294
INCOMPLETE_FEATURES ,
2295
2295
span,
2296
2296
BuiltinIncompleteFeatures { name, note, help } ,
2297
2297
) ;
2298
2298
} else {
2299
- cx. emit_spanned_lint ( INTERNAL_FEATURES , span, BuiltinInternalFeatures { name } ) ;
2299
+ cx. emit_span_lint ( INTERNAL_FEATURES , span, BuiltinInternalFeatures { name } ) ;
2300
2300
}
2301
2301
} ) ;
2302
2302
}
@@ -2612,7 +2612,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue {
2612
2612
InitKind :: Uninit => fluent:: lint_builtin_unpermitted_type_init_uninit,
2613
2613
} ;
2614
2614
let sub = BuiltinUnpermittedTypeInitSub { err } ;
2615
- cx. emit_spanned_lint (
2615
+ cx. emit_span_lint (
2616
2616
INVALID_VALUE ,
2617
2617
expr. span ,
2618
2618
BuiltinUnpermittedTypeInit {
@@ -2700,7 +2700,7 @@ impl<'tcx> LateLintPass<'tcx> for DerefNullPtr {
2700
2700
2701
2701
if let rustc_hir:: ExprKind :: Unary ( rustc_hir:: UnOp :: Deref , expr_deref) = expr. kind {
2702
2702
if is_null_ptr ( cx, expr_deref) {
2703
- cx. emit_spanned_lint (
2703
+ cx. emit_span_lint (
2704
2704
DEREF_NULLPTR ,
2705
2705
expr. span ,
2706
2706
BuiltinDerefNullptr { label : expr. span } ,
@@ -2925,12 +2925,12 @@ impl EarlyLintPass for SpecialModuleName {
2925
2925
}
2926
2926
2927
2927
match item. ident . name . as_str ( ) {
2928
- "lib" => cx. emit_spanned_lint (
2928
+ "lib" => cx. emit_span_lint (
2929
2929
SPECIAL_MODULE_NAME ,
2930
2930
item. span ,
2931
2931
BuiltinSpecialModuleNameUsed :: Lib ,
2932
2932
) ,
2933
- "main" => cx. emit_spanned_lint (
2933
+ "main" => cx. emit_span_lint (
2934
2934
SPECIAL_MODULE_NAME ,
2935
2935
item. span ,
2936
2936
BuiltinSpecialModuleNameUsed :: Main ,
0 commit comments