@@ -242,6 +242,9 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
242
242
& Attribute :: Parsed ( AttributeKind :: PassByValue ( attr_span) ) => {
243
243
self . check_pass_by_value ( attr_span, span, target)
244
244
}
245
+ & Attribute :: Parsed ( AttributeKind :: StdInternalSymbol ( attr_span) ) => {
246
+ self . check_rustc_std_internal_symbol ( attr_span, span, target)
247
+ }
245
248
Attribute :: Unparsed ( attr_item) => {
246
249
style = Some ( attr_item. style ) ;
247
250
match attr. path ( ) . as_slice ( ) {
@@ -267,9 +270,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
267
270
) ,
268
271
[ sym:: no_link, ..] => self . check_no_link ( hir_id, attr, span, target) ,
269
272
[ 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
- }
273
273
[ sym:: rustc_no_implicit_autorefs, ..] => {
274
274
self . check_applied_to_fn_or_method ( hir_id, attr. span ( ) , span, target)
275
275
}
@@ -2220,13 +2220,11 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
2220
2220
}
2221
2221
}
2222
2222
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 ) {
2224
2224
match target {
2225
2225
Target :: Fn | Target :: Static | Target :: ForeignFn | Target :: ForeignStatic => { }
2226
2226
_ => {
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 } ) ;
2230
2228
}
2231
2229
}
2232
2230
}
0 commit comments