@@ -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
@@ -1270,7 +1270,7 @@ impl<'tcx> LateLintPass<'tcx> for UnstableFeatures {
12701270 && let Some ( items) = attr. meta_item_list ( )
12711271 {
12721272 for item in items {
1273- cx. emit_spanned_lint ( UNSTABLE_FEATURES , item. span ( ) , BuiltinUnstableFeatures ) ;
1273+ cx. emit_span_lint ( UNSTABLE_FEATURES , item. span ( ) , BuiltinUnstableFeatures ) ;
12741274 }
12751275 }
12761276 }
@@ -1323,7 +1323,7 @@ impl<'tcx> LateLintPass<'tcx> for UngatedAsyncFnTrackCaller {
13231323 // Now, check if the function has the `#[track_caller]` attribute
13241324 && let Some ( attr) = cx. tcx . get_attr ( def_id, sym:: track_caller)
13251325 {
1326- cx. emit_spanned_lint (
1326+ cx. emit_span_lint (
13271327 UNGATED_ASYNC_FN_TRACK_CALLER ,
13281328 attr. span ,
13291329 BuiltinUngatedAsyncFnTrackCaller { label : span, session : & cx. tcx . sess } ,
@@ -1389,7 +1389,7 @@ impl UnreachablePub {
13891389 applicability = Applicability :: MaybeIncorrect ;
13901390 }
13911391 let def_span = cx. tcx . def_span ( def_id) ;
1392- cx. emit_spanned_lint (
1392+ cx. emit_span_lint (
13931393 UNREACHABLE_PUB ,
13941394 def_span,
13951395 BuiltinUnreachablePub {
@@ -1518,7 +1518,7 @@ impl<'tcx> LateLintPass<'tcx> for TypeAliasBounds {
15181518 suggested_changing_assoc_types = true ;
15191519 SuggestChangingAssocTypes { ty : hir_ty }
15201520 } ) ;
1521- cx. emit_spanned_lint (
1521+ cx. emit_span_lint (
15221522 TYPE_ALIAS_BOUNDS ,
15231523 where_spans,
15241524 BuiltinTypeAliasWhereClause {
@@ -1534,7 +1534,7 @@ impl<'tcx> LateLintPass<'tcx> for TypeAliasBounds {
15341534 suggested_changing_assoc_types = true ;
15351535 SuggestChangingAssocTypes { ty : hir_ty }
15361536 } ) ;
1537- cx. emit_spanned_lint (
1537+ cx. emit_span_lint (
15381538 TYPE_ALIAS_BOUNDS ,
15391539 inline_spans,
15401540 BuiltinTypeAliasGenericBounds { suggestion, sub } ,
@@ -1633,7 +1633,7 @@ impl<'tcx> LateLintPass<'tcx> for TrivialConstraints {
16331633 | ClauseKind :: ConstEvaluatable ( ..) => continue ,
16341634 } ;
16351635 if predicate. is_global ( ) {
1636- cx. emit_spanned_lint (
1636+ cx. emit_span_lint (
16371637 TRIVIAL_BOUNDS ,
16381638 span,
16391639 BuiltinTrivialBounds { predicate_kind_name, predicate } ,
@@ -1751,7 +1751,7 @@ impl EarlyLintPass for EllipsisInclusiveRangePatterns {
17511751 replace,
17521752 } ) ;
17531753 } else {
1754- cx. emit_spanned_lint (
1754+ cx. emit_span_lint (
17551755 ELLIPSIS_INCLUSIVE_RANGE_PATTERNS ,
17561756 pat. span ,
17571757 BuiltinEllipsisInclusiveRangePatternsLint :: Parenthesise {
@@ -1769,7 +1769,7 @@ impl EarlyLintPass for EllipsisInclusiveRangePatterns {
17691769 replace : replace. to_string ( ) ,
17701770 } ) ;
17711771 } else {
1772- cx. emit_spanned_lint (
1772+ cx. emit_span_lint (
17731773 ELLIPSIS_INCLUSIVE_RANGE_PATTERNS ,
17741774 join,
17751775 BuiltinEllipsisInclusiveRangePatternsLint :: NonParenthesise {
@@ -1895,7 +1895,7 @@ impl KeywordIdents {
18951895 return ;
18961896 }
18971897
1898- cx. emit_spanned_lint (
1898+ cx. emit_span_lint (
18991899 KEYWORD_IDENTS ,
19001900 ident. span ,
19011901 BuiltinKeywordIdents { kw : ident, next : next_edition, suggestion : ident. span } ,
@@ -2203,7 +2203,7 @@ impl<'tcx> LateLintPass<'tcx> for ExplicitOutlivesRequirements {
22032203 lint_spans. sort_unstable ( ) ;
22042204 lint_spans. dedup ( ) ;
22052205
2206- cx. emit_spanned_lint (
2206+ cx. emit_span_lint (
22072207 EXPLICIT_OUTLIVES_REQUIREMENTS ,
22082208 lint_spans. clone ( ) ,
22092209 BuiltinExplicitOutlives {
@@ -2290,13 +2290,13 @@ impl EarlyLintPass for IncompleteInternalFeatures {
22902290 let help =
22912291 HAS_MIN_FEATURES . contains ( & name) . then_some ( BuiltinIncompleteFeaturesHelp ) ;
22922292
2293- cx. emit_spanned_lint (
2293+ cx. emit_span_lint (
22942294 INCOMPLETE_FEATURES ,
22952295 span,
22962296 BuiltinIncompleteFeatures { name, note, help } ,
22972297 ) ;
22982298 } else {
2299- cx. emit_spanned_lint ( INTERNAL_FEATURES , span, BuiltinInternalFeatures { name } ) ;
2299+ cx. emit_span_lint ( INTERNAL_FEATURES , span, BuiltinInternalFeatures { name } ) ;
23002300 }
23012301 } ) ;
23022302 }
@@ -2612,7 +2612,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue {
26122612 InitKind :: Uninit => fluent:: lint_builtin_unpermitted_type_init_uninit,
26132613 } ;
26142614 let sub = BuiltinUnpermittedTypeInitSub { err } ;
2615- cx. emit_spanned_lint (
2615+ cx. emit_span_lint (
26162616 INVALID_VALUE ,
26172617 expr. span ,
26182618 BuiltinUnpermittedTypeInit {
@@ -2700,7 +2700,7 @@ impl<'tcx> LateLintPass<'tcx> for DerefNullPtr {
27002700
27012701 if let rustc_hir:: ExprKind :: Unary ( rustc_hir:: UnOp :: Deref , expr_deref) = expr. kind {
27022702 if is_null_ptr ( cx, expr_deref) {
2703- cx. emit_spanned_lint (
2703+ cx. emit_span_lint (
27042704 DEREF_NULLPTR ,
27052705 expr. span ,
27062706 BuiltinDerefNullptr { label : expr. span } ,
@@ -2925,12 +2925,12 @@ impl EarlyLintPass for SpecialModuleName {
29252925 }
29262926
29272927 match item. ident . name . as_str ( ) {
2928- "lib" => cx. emit_spanned_lint (
2928+ "lib" => cx. emit_span_lint (
29292929 SPECIAL_MODULE_NAME ,
29302930 item. span ,
29312931 BuiltinSpecialModuleNameUsed :: Lib ,
29322932 ) ,
2933- "main" => cx. emit_spanned_lint (
2933+ "main" => cx. emit_span_lint (
29342934 SPECIAL_MODULE_NAME ,
29352935 item. span ,
29362936 BuiltinSpecialModuleNameUsed :: Main ,
0 commit comments