@@ -236,6 +236,9 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
236236 & Attribute :: Parsed ( AttributeKind :: PassByValue ( attr_span) ) => {
237237 self . check_pass_by_value ( attr_span, span, target)
238238 }
239+ & Attribute :: Parsed ( AttributeKind :: StdInternalSymbol ( attr_span) ) => {
240+ self . check_rustc_std_internal_symbol ( attr_span, span, target)
241+ }
239242 Attribute :: Unparsed ( attr_item) => {
240243 style = Some ( attr_item. style ) ;
241244 match attr. path ( ) . as_slice ( ) {
@@ -261,9 +264,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
261264 ) ,
262265 [ sym:: no_link, ..] => self . check_no_link ( hir_id, attr, span, target) ,
263266 [ sym:: debugger_visualizer, ..] => self . check_debugger_visualizer ( attr, target) ,
264- [ sym:: rustc_std_internal_symbol, ..] => {
265- self . check_rustc_std_internal_symbol ( attr, span, target)
266- }
267267 [ sym:: rustc_no_implicit_autorefs, ..] => {
268268 self . check_applied_to_fn_or_method ( hir_id, attr. span ( ) , span, target)
269269 }
@@ -2218,13 +2218,11 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
22182218 }
22192219 }
22202220
2221- fn check_rustc_std_internal_symbol ( & self , attr : & Attribute , span : Span , target : Target ) {
2221+ fn check_rustc_std_internal_symbol ( & self , attr_span : Span , span : Span , target : Target ) {
22222222 match target {
22232223 Target :: Fn | Target :: Static | Target :: ForeignFn | Target :: ForeignStatic => { }
22242224 _ => {
2225- self . tcx
2226- . dcx ( )
2227- . emit_err ( errors:: RustcStdInternalSymbol { attr_span : attr. span ( ) , span } ) ;
2225+ self . tcx . dcx ( ) . emit_err ( errors:: RustcStdInternalSymbol { attr_span, span } ) ;
22282226 }
22292227 }
22302228 }
0 commit comments