@@ -338,13 +338,11 @@ impl<'hir> LoweringContext<'_, 'hir> {
338338 // lifetime to be added, but rather a reference to a
339339 // parent lifetime.
340340 let itctx = ImplTraitContext :: Universal ;
341+ // TODO we need to rip apart this infrastructure
341342 let ( generics, ( trait_ref, lowered_ty) ) =
342- self . lower_generics ( ast_generics, * constness , id, itctx, |this| {
343+ self . lower_generics ( ast_generics, Const :: No , id, itctx, |this| {
343344 let modifiers = TraitBoundModifiers {
344- constness : match * constness {
345- Const :: Yes ( span) => BoundConstness :: Maybe ( span) ,
346- Const :: No => BoundConstness :: Never ,
347- } ,
345+ constness : BoundConstness :: Never ,
348346 asyncness : BoundAsyncness :: Normal ,
349347 // we don't use this in bound lowering
350348 polarity : BoundPolarity :: Positive ,
@@ -379,6 +377,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
379377 ImplPolarity :: Negative ( s) => ImplPolarity :: Negative ( self . lower_span ( * s) ) ,
380378 } ;
381379 hir:: ItemKind :: Impl ( self . arena . alloc ( hir:: Impl {
380+ constness : self . lower_constness ( * constness) ,
382381 unsafety : self . lower_unsafety ( * unsafety) ,
383382 polarity,
384383 defaultness,
@@ -390,15 +389,9 @@ impl<'hir> LoweringContext<'_, 'hir> {
390389 } ) )
391390 }
392391 ItemKind :: Trait ( box Trait { is_auto, unsafety, generics, bounds, items } ) => {
393- // FIXME(const_trait_impl, effects, fee1-dead) this should be simplified if possible
394- let constness = attrs
395- . unwrap_or ( & [ ] )
396- . iter ( )
397- . find ( |x| x. has_name ( sym:: const_trait) )
398- . map_or ( Const :: No , |x| Const :: Yes ( x. span ) ) ;
399392 let ( generics, ( unsafety, items, bounds) ) = self . lower_generics (
400393 generics,
401- constness ,
394+ Const :: No ,
402395 id,
403396 ImplTraitContext :: Disallowed ( ImplTraitPosition :: Generic ) ,
404397 |this| {
0 commit comments