@@ -233,6 +233,9 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
233233 & Attribute :: Parsed ( AttributeKind :: PassByValue ( attr_span) ) => {
234234 self . check_pass_by_value ( attr_span, span, target)
235235 }
236+ & Attribute :: Parsed ( AttributeKind :: StdInternalSymbol ( attr_span) ) => {
237+ self . check_rustc_std_internal_symbol ( attr_span, span, target)
238+ }
236239 Attribute :: Unparsed ( attr_item) => {
237240 style = Some ( attr_item. style ) ;
238241 match attr. path ( ) . as_slice ( ) {
@@ -259,9 +262,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
259262 ) ,
260263 [ sym:: no_link, ..] => self . check_no_link ( hir_id, attr, span, target) ,
261264 [ sym:: debugger_visualizer, ..] => self . check_debugger_visualizer ( attr, target) ,
262- [ sym:: rustc_std_internal_symbol, ..] => {
263- self . check_rustc_std_internal_symbol ( attr, span, target)
264- }
265265 [ sym:: rustc_no_implicit_autorefs, ..] => {
266266 self . check_applied_to_fn_or_method ( hir_id, attr. span ( ) , span, target)
267267 }
@@ -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