@@ -242,6 +242,9 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
242242 & Attribute :: Parsed ( AttributeKind :: PassByValue ( attr_span) ) => {
243243 self . check_pass_by_value ( attr_span, span, target)
244244 }
245+ & Attribute :: Parsed ( AttributeKind :: StdInternalSymbol ( attr_span) ) => {
246+ self . check_rustc_std_internal_symbol ( attr_span, span, target)
247+ }
245248 Attribute :: Unparsed ( attr_item) => {
246249 style = Some ( attr_item. style ) ;
247250 match attr. path ( ) . as_slice ( ) {
@@ -267,9 +270,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
267270 ) ,
268271 [ sym:: no_link, ..] => self . check_no_link ( hir_id, attr, span, target) ,
269272 [ sym:: debugger_visualizer, ..] => self . check_debugger_visualizer ( attr, target) ,
270- [ sym:: rustc_std_internal_symbol, ..] => {
271- self . check_rustc_std_internal_symbol ( attr, span, target)
272- }
273273 [ sym:: rustc_no_implicit_autorefs, ..] => {
274274 self . check_applied_to_fn_or_method ( hir_id, attr. span ( ) , span, target)
275275 }
@@ -2220,13 +2220,11 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
22202220 }
22212221 }
22222222
2223- fn check_rustc_std_internal_symbol ( & self , attr : & Attribute , span : Span , target : Target ) {
2223+ fn check_rustc_std_internal_symbol ( & self , attr_span : Span , span : Span , target : Target ) {
22242224 match target {
22252225 Target :: Fn | Target :: Static | Target :: ForeignFn | Target :: ForeignStatic => { }
22262226 _ => {
2227- self . tcx
2228- . dcx ( )
2229- . emit_err ( errors:: RustcStdInternalSymbol { attr_span : attr. span ( ) , span } ) ;
2227+ self . tcx . dcx ( ) . emit_err ( errors:: RustcStdInternalSymbol { attr_span, span } ) ;
22302228 }
22312229 }
22322230 }
0 commit comments