@@ -341,16 +341,12 @@ impl<'hir> LoweringContext<'_, 'hir> {
341341 // lifetime to be added, but rather a reference to a
342342 // parent lifetime.
343343 let itctx = ImplTraitContext :: Universal ;
344+ // TODO we need to rip apart this infrastructure
344345 let ( generics, ( trait_ref, lowered_ty) ) =
345- self . lower_generics ( ast_generics, * constness, id, & itctx, |this| {
346- let constness = match * constness {
347- Const :: Yes ( span) => BoundConstness :: Maybe ( span) ,
348- Const :: No => BoundConstness :: Never ,
349- } ;
350-
346+ self . lower_generics ( ast_generics, Const :: No , id, & itctx, |this| {
351347 let trait_ref = trait_ref. as_ref ( ) . map ( |trait_ref| {
352348 this. lower_trait_ref (
353- constness ,
349+ BoundConstness :: Never ,
354350 trait_ref,
355351 & ImplTraitContext :: Disallowed ( ImplTraitPosition :: Trait ) ,
356352 )
@@ -377,6 +373,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
377373 ImplPolarity :: Negative ( s) => ImplPolarity :: Negative ( self . lower_span ( * s) ) ,
378374 } ;
379375 hir:: ItemKind :: Impl ( self . arena . alloc ( hir:: Impl {
376+ constness : self . lower_constness ( * constness) ,
380377 unsafety : self . lower_unsafety ( * unsafety) ,
381378 polarity,
382379 defaultness,
@@ -388,15 +385,9 @@ impl<'hir> LoweringContext<'_, 'hir> {
388385 } ) )
389386 }
390387 ItemKind :: Trait ( box Trait { is_auto, unsafety, generics, bounds, items } ) => {
391- // FIXME(const_trait_impl, effects, fee1-dead) this should be simplified if possible
392- let constness = attrs
393- . unwrap_or ( & [ ] )
394- . iter ( )
395- . find ( |x| x. has_name ( sym:: const_trait) )
396- . map_or ( Const :: No , |x| Const :: Yes ( x. span ) ) ;
397388 let ( generics, ( unsafety, items, bounds) ) = self . lower_generics (
398389 generics,
399- constness ,
390+ Const :: No ,
400391 id,
401392 & ImplTraitContext :: Disallowed ( ImplTraitPosition :: Generic ) ,
402393 |this| {
0 commit comments