@@ -222,6 +222,9 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
222222 Attribute :: Parsed ( AttributeKind :: Used { span : attr_span, .. } ) => {
223223 self . check_used ( * attr_span, target, span) ;
224224 }
225+ & Attribute :: Parsed ( AttributeKind :: StdInternalSymbol ( attr_span) ) => {
226+ self . check_rustc_std_internal_symbol ( attr_span, span, target)
227+ }
225228 Attribute :: Unparsed ( attr_item) => {
226229 style = Some ( attr_item. style ) ;
227230 match attr. path ( ) . as_slice ( ) {
@@ -248,9 +251,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
248251 ) ,
249252 [ sym:: no_link, ..] => self . check_no_link ( hir_id, attr, span, target) ,
250253 [ sym:: debugger_visualizer, ..] => self . check_debugger_visualizer ( attr, target) ,
251- [ sym:: rustc_std_internal_symbol, ..] => {
252- self . check_rustc_std_internal_symbol ( attr, span, target)
253- }
254254 [ sym:: rustc_no_implicit_autorefs, ..] => {
255255 self . check_applied_to_fn_or_method ( hir_id, attr. span ( ) , span, target)
256256 }
@@ -2189,13 +2189,11 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
21892189 }
21902190 }
21912191
2192- fn check_rustc_std_internal_symbol ( & self , attr : & Attribute , span : Span , target : Target ) {
2192+ fn check_rustc_std_internal_symbol ( & self , attr_span : Span , span : Span , target : Target ) {
21932193 match target {
21942194 Target :: Fn | Target :: Static | Target :: ForeignFn | Target :: ForeignStatic => { }
21952195 _ => {
2196- self . tcx
2197- . dcx ( )
2198- . emit_err ( errors:: RustcStdInternalSymbol { attr_span : attr. span ( ) , span } ) ;
2196+ self . tcx . dcx ( ) . emit_err ( errors:: RustcStdInternalSymbol { attr_span, span } ) ;
21992197 }
22002198 }
22012199 }
0 commit comments