@@ -12,7 +12,7 @@ use rustc_middle::ty::{
1212 self as ty, IsSuggestable , Ty , TyCtxt , TypeSuperVisitable , TypeVisitable , TypeVisitableExt ,
1313 TypeVisitor , Upcast ,
1414} ;
15- use rustc_span:: { ErrorGuaranteed , Ident , Span , kw, sym } ;
15+ use rustc_span:: { ErrorGuaranteed , Ident , Span , kw} ;
1616use rustc_trait_selection:: traits;
1717use smallvec:: SmallVec ;
1818use tracing:: { debug, instrument} ;
@@ -170,7 +170,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
170170 let tcx = self . tcx ( ) ;
171171
172172 // Skip adding any default bounds if `#![rustc_no_implicit_bounds]`
173- if tcx. has_attr ( CRATE_DEF_ID , sym :: rustc_no_implicit_bounds ) {
173+ if find_attr ! ( tcx. get_all_attrs ( CRATE_DEF_ID ) , AttributeKind :: RustcNoImplicitBounds ) {
174174 return ;
175175 }
176176
@@ -284,7 +284,8 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
284284 context : ImpliedBoundsContext < ' tcx > ,
285285 ) -> bool {
286286 let collected = collect_bounds ( hir_bounds, context, trait_def_id) ;
287- !self . tcx ( ) . has_attr ( CRATE_DEF_ID , sym:: rustc_no_implicit_bounds) && !collected. any ( )
287+ !find_attr ! ( self . tcx( ) . get_all_attrs( CRATE_DEF_ID ) , AttributeKind :: RustcNoImplicitBounds )
288+ && !collected. any ( )
288289 }
289290
290291 fn reject_duplicate_relaxed_bounds ( & self , relaxed_bounds : SmallVec < [ & PolyTraitRef < ' _ > ; 1 ] > ) {
0 commit comments