@@ -121,7 +121,7 @@ impl EarlyLintPass for WhileTrue {
121121 "{}loop" ,
122122 label. map_or_else( String :: new, |label| format!( "{}: " , label. ident, ) )
123123 ) ;
124- cx. emit_spanned_lint (
124+ cx. emit_span_lint (
125125 WHILE_TRUE ,
126126 condition_span,
127127 BuiltinWhileTrue { suggestion : condition_span, replace } ,
@@ -162,7 +162,7 @@ impl BoxPointers {
162162 if let GenericArgKind :: Type ( leaf_ty) = leaf. unpack ( )
163163 && leaf_ty. is_box ( )
164164 {
165- cx. emit_spanned_lint ( BOX_POINTERS , span, BuiltinBoxPointers { ty } ) ;
165+ cx. emit_span_lint ( BOX_POINTERS , span, BuiltinBoxPointers { ty } ) ;
166166 }
167167 }
168168 }
@@ -265,7 +265,7 @@ impl<'tcx> LateLintPass<'tcx> for NonShorthandFieldPatterns {
265265 if cx. tcx . find_field_index ( ident, variant)
266266 == Some ( cx. typeck_results ( ) . field_index ( fieldpat. hir_id ) )
267267 {
268- cx. emit_spanned_lint (
268+ cx. emit_span_lint (
269269 NON_SHORTHAND_FIELD_PATTERNS ,
270270 fieldpat. span ,
271271 BuiltinNonShorthandFieldPatterns {
@@ -334,7 +334,7 @@ impl UnsafeCode {
334334 return ;
335335 }
336336
337- cx. emit_spanned_lint ( UNSAFE_CODE , span, decorate) ;
337+ cx. emit_span_lint ( UNSAFE_CODE , span, decorate) ;
338338 }
339339}
340340
@@ -509,7 +509,7 @@ impl MissingDoc {
509509 let attrs = cx. tcx . hir ( ) . attrs ( cx. tcx . local_def_id_to_hir_id ( def_id) ) ;
510510 let has_doc = attrs. iter ( ) . any ( has_doc) ;
511511 if !has_doc {
512- cx. emit_spanned_lint (
512+ cx. emit_span_lint (
513513 MISSING_DOCS ,
514514 cx. tcx . def_span ( def_id) ,
515515 BuiltinMissingDoc { article, desc } ,
@@ -710,7 +710,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingCopyImplementations {
710710 )
711711 . is_ok ( )
712712 {
713- cx. emit_spanned_lint ( MISSING_COPY_IMPLEMENTATIONS , item. span , BuiltinMissingCopyImpl ) ;
713+ cx. emit_span_lint ( MISSING_COPY_IMPLEMENTATIONS , item. span , BuiltinMissingCopyImpl ) ;
714714 }
715715 }
716716}
@@ -795,7 +795,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingDebugImplementations {
795795 . next ( )
796796 . is_some ( ) ;
797797 if !has_impl {
798- cx. emit_spanned_lint (
798+ cx. emit_span_lint (
799799 MISSING_DEBUG_IMPLEMENTATIONS ,
800800 item. span ,
801801 BuiltinMissingDebugImpl { tcx : cx. tcx , def_id : debug } ,
@@ -874,7 +874,7 @@ impl EarlyLintPass for AnonymousParameters {
874874 } else {
875875 ( "<type>" , Applicability :: HasPlaceholders )
876876 } ;
877- cx. emit_spanned_lint (
877+ cx. emit_span_lint (
878878 ANONYMOUS_PARAMETERS ,
879879 arg. pat . span ,
880880 BuiltinAnonymousParams { suggestion : ( arg. pat . span , appl) , ty_snip } ,
@@ -921,7 +921,7 @@ impl EarlyLintPass for DeprecatedAttr {
921921 BuiltinDeprecatedAttrLinkSuggestion :: Default { suggestion : attr. span }
922922 }
923923 } ;
924- cx. emit_spanned_lint (
924+ cx. emit_span_lint (
925925 DEPRECATED ,
926926 attr. span ,
927927 BuiltinDeprecatedAttrLink { name, reason, link, suggestion } ,
@@ -931,7 +931,7 @@ impl EarlyLintPass for DeprecatedAttr {
931931 }
932932 }
933933 if attr. has_name ( sym:: no_start) || attr. has_name ( sym:: crate_id) {
934- cx. emit_spanned_lint (
934+ cx. emit_span_lint (
935935 DEPRECATED ,
936936 attr. span ,
937937 BuiltinDeprecatedAttrUsed {
@@ -973,7 +973,7 @@ fn warn_if_doc(cx: &EarlyContext<'_>, node_span: Span, node_kind: &str, attrs: &
973973 BuiltinUnusedDocCommentSub :: BlockHelp
974974 }
975975 } ;
976- cx. emit_spanned_lint (
976+ cx. emit_span_lint (
977977 UNUSED_DOC_COMMENTS ,
978978 span,
979979 BuiltinUnusedDocComment { kind : node_kind, label : node_span, sub } ,
@@ -1107,7 +1107,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidNoMangleItems {
11071107 match param. kind {
11081108 GenericParamKind :: Lifetime { .. } => { }
11091109 GenericParamKind :: Type { .. } | GenericParamKind :: Const { .. } => {
1110- cx. emit_spanned_lint (
1110+ cx. emit_span_lint (
11111111 NO_MANGLE_GENERIC_ITEMS ,
11121112 span,
11131113 BuiltinNoMangleGeneric { suggestion : no_mangle_attr. span } ,
@@ -1138,7 +1138,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidNoMangleItems {
11381138
11391139 // Const items do not refer to a particular location in memory, and therefore
11401140 // don't have anything to attach a symbol to
1141- cx. emit_spanned_lint (
1141+ cx. emit_span_lint (
11421142 NO_MANGLE_CONST_ITEMS ,
11431143 it. span ,
11441144 BuiltinConstNoMangle { suggestion } ,
@@ -1201,7 +1201,7 @@ impl<'tcx> LateLintPass<'tcx> for MutableTransmutes {
12011201 get_transmute_from_to ( cx, expr) . map ( |( ty1, ty2) | ( ty1. kind ( ) , ty2. kind ( ) ) )
12021202 {
12031203 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 ) ;
12051205 }
12061206 }
12071207
@@ -1249,7 +1249,7 @@ impl<'tcx> LateLintPass<'tcx> for UnstableFeatures {
12491249 if attr. has_name ( sym:: feature) {
12501250 if let Some ( items) = attr. meta_item_list ( ) {
12511251 for item in items {
1252- cx. emit_spanned_lint ( UNSTABLE_FEATURES , item. span ( ) , BuiltinUnstableFeatures ) ;
1252+ cx. emit_span_lint ( UNSTABLE_FEATURES , item. span ( ) , BuiltinUnstableFeatures ) ;
12531253 }
12541254 }
12551255 }
@@ -1303,7 +1303,7 @@ impl<'tcx> LateLintPass<'tcx> for UngatedAsyncFnTrackCaller {
13031303 // Now, check if the function has the `#[track_caller]` attribute
13041304 && let Some ( attr) = cx. tcx . get_attr ( def_id, sym:: track_caller)
13051305 {
1306- cx. emit_spanned_lint (
1306+ cx. emit_span_lint (
13071307 UNGATED_ASYNC_FN_TRACK_CALLER ,
13081308 attr. span ,
13091309 BuiltinUngatedAsyncFnTrackCaller { label : span, session : & cx. tcx . sess } ,
@@ -1369,7 +1369,7 @@ impl UnreachablePub {
13691369 applicability = Applicability :: MaybeIncorrect ;
13701370 }
13711371 let def_span = cx. tcx . def_span ( def_id) ;
1372- cx. emit_spanned_lint (
1372+ cx. emit_span_lint (
13731373 UNREACHABLE_PUB ,
13741374 def_span,
13751375 BuiltinUnreachablePub {
@@ -1498,7 +1498,7 @@ impl<'tcx> LateLintPass<'tcx> for TypeAliasBounds {
14981498 suggested_changing_assoc_types = true ;
14991499 SuggestChangingAssocTypes { ty : hir_ty }
15001500 } ) ;
1501- cx. emit_spanned_lint (
1501+ cx. emit_span_lint (
15021502 TYPE_ALIAS_BOUNDS ,
15031503 where_spans,
15041504 BuiltinTypeAliasWhereClause {
@@ -1514,7 +1514,7 @@ impl<'tcx> LateLintPass<'tcx> for TypeAliasBounds {
15141514 suggested_changing_assoc_types = true ;
15151515 SuggestChangingAssocTypes { ty : hir_ty }
15161516 } ) ;
1517- cx. emit_spanned_lint (
1517+ cx. emit_span_lint (
15181518 TYPE_ALIAS_BOUNDS ,
15191519 inline_spans,
15201520 BuiltinTypeAliasGenericBounds { suggestion, sub } ,
@@ -1613,7 +1613,7 @@ impl<'tcx> LateLintPass<'tcx> for TrivialConstraints {
16131613 | ClauseKind :: ConstEvaluatable ( ..) => continue ,
16141614 } ;
16151615 if predicate. is_global ( ) {
1616- cx. emit_spanned_lint (
1616+ cx. emit_span_lint (
16171617 TRIVIAL_BOUNDS ,
16181618 span,
16191619 BuiltinTrivialBounds { predicate_kind_name, predicate } ,
@@ -1731,7 +1731,7 @@ impl EarlyLintPass for EllipsisInclusiveRangePatterns {
17311731 replace,
17321732 } ) ;
17331733 } else {
1734- cx. emit_spanned_lint (
1734+ cx. emit_span_lint (
17351735 ELLIPSIS_INCLUSIVE_RANGE_PATTERNS ,
17361736 pat. span ,
17371737 BuiltinEllipsisInclusiveRangePatternsLint :: Parenthesise {
@@ -1749,7 +1749,7 @@ impl EarlyLintPass for EllipsisInclusiveRangePatterns {
17491749 replace : replace. to_string ( ) ,
17501750 } ) ;
17511751 } else {
1752- cx. emit_spanned_lint (
1752+ cx. emit_span_lint (
17531753 ELLIPSIS_INCLUSIVE_RANGE_PATTERNS ,
17541754 join,
17551755 BuiltinEllipsisInclusiveRangePatternsLint :: NonParenthesise {
@@ -1875,7 +1875,7 @@ impl KeywordIdents {
18751875 return ;
18761876 }
18771877
1878- cx. emit_spanned_lint (
1878+ cx. emit_span_lint (
18791879 KEYWORD_IDENTS ,
18801880 ident. span ,
18811881 BuiltinKeywordIdents { kw : ident, next : next_edition, suggestion : ident. span } ,
@@ -2183,7 +2183,7 @@ impl<'tcx> LateLintPass<'tcx> for ExplicitOutlivesRequirements {
21832183 lint_spans. sort_unstable ( ) ;
21842184 lint_spans. dedup ( ) ;
21852185
2186- cx. emit_spanned_lint (
2186+ cx. emit_span_lint (
21872187 EXPLICIT_OUTLIVES_REQUIREMENTS ,
21882188 lint_spans. clone ( ) ,
21892189 BuiltinExplicitOutlives {
@@ -2270,13 +2270,13 @@ impl EarlyLintPass for IncompleteInternalFeatures {
22702270 let help =
22712271 HAS_MIN_FEATURES . contains ( & name) . then_some ( BuiltinIncompleteFeaturesHelp ) ;
22722272
2273- cx. emit_spanned_lint (
2273+ cx. emit_span_lint (
22742274 INCOMPLETE_FEATURES ,
22752275 span,
22762276 BuiltinIncompleteFeatures { name, note, help } ,
22772277 ) ;
22782278 } else {
2279- cx. emit_spanned_lint ( INTERNAL_FEATURES , span, BuiltinInternalFeatures { name } ) ;
2279+ cx. emit_span_lint ( INTERNAL_FEATURES , span, BuiltinInternalFeatures { name } ) ;
22802280 }
22812281 } ) ;
22822282 }
@@ -2592,7 +2592,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue {
25922592 InitKind :: Uninit => fluent:: lint_builtin_unpermitted_type_init_uninit,
25932593 } ;
25942594 let sub = BuiltinUnpermittedTypeInitSub { err } ;
2595- cx. emit_spanned_lint (
2595+ cx. emit_span_lint (
25962596 INVALID_VALUE ,
25972597 expr. span ,
25982598 BuiltinUnpermittedTypeInit {
@@ -2680,7 +2680,7 @@ impl<'tcx> LateLintPass<'tcx> for DerefNullPtr {
26802680
26812681 if let rustc_hir:: ExprKind :: Unary ( rustc_hir:: UnOp :: Deref , expr_deref) = expr. kind {
26822682 if is_null_ptr ( cx, expr_deref) {
2683- cx. emit_spanned_lint (
2683+ cx. emit_span_lint (
26842684 DEREF_NULLPTR ,
26852685 expr. span ,
26862686 BuiltinDerefNullptr { label : expr. span } ,
@@ -2905,12 +2905,12 @@ impl EarlyLintPass for SpecialModuleName {
29052905 }
29062906
29072907 match item. ident . name . as_str ( ) {
2908- "lib" => cx. emit_spanned_lint (
2908+ "lib" => cx. emit_span_lint (
29092909 SPECIAL_MODULE_NAME ,
29102910 item. span ,
29112911 BuiltinSpecialModuleNameUsed :: Lib ,
29122912 ) ,
2913- "main" => cx. emit_spanned_lint (
2913+ "main" => cx. emit_span_lint (
29142914 SPECIAL_MODULE_NAME ,
29152915 item. span ,
29162916 BuiltinSpecialModuleNameUsed :: Main ,
0 commit comments