@@ -274,7 +274,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
274274 item_segment. args ( ) ,
275275 item_segment. infer_args ,
276276 None ,
277- None ,
277+ ty :: BoundConstness :: NotConst ,
278278 ) ;
279279 if let Some ( b) = item_segment. args ( ) . bindings . first ( ) {
280280 Self :: prohibit_assoc_ty_binding ( self . tcx ( ) , b. span ) ;
@@ -324,7 +324,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
324324 generic_args : & ' a hir:: GenericArgs < ' _ > ,
325325 infer_args : bool ,
326326 self_ty : Option < Ty < ' tcx > > ,
327- constness : Option < ty:: BoundConstness > ,
327+ constness : ty:: BoundConstness ,
328328 ) -> ( SubstsRef < ' tcx > , GenericArgCountResult ) {
329329 // If the type is parameterized by this region, then replace this
330330 // region with the current anon region binding (in other words,
@@ -538,7 +538,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
538538 & mut substs_ctx,
539539 ) ;
540540
541- if let Some ( ty:: BoundConstness :: ConstIfConst ) = constness
541+ if let ty:: BoundConstness :: ConstIfConst = constness
542542 && generics. has_self && !tcx. has_attr ( def_id, sym:: const_trait)
543543 {
544544 tcx. sess . emit_err ( crate :: errors:: ConstBoundForNonConstTrait { span } ) ;
@@ -611,7 +611,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
611611 item_segment. args ( ) ,
612612 item_segment. infer_args ,
613613 None ,
614- None ,
614+ ty :: BoundConstness :: NotConst ,
615615 ) ;
616616
617617 if let Some ( b) = item_segment. args ( ) . bindings . first ( ) {
@@ -641,7 +641,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
641641 self_ty,
642642 trait_ref. path . segments . last ( ) . unwrap ( ) ,
643643 true ,
644- Some ( constness) ,
644+ constness,
645645 )
646646 }
647647
@@ -668,7 +668,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
668668 args,
669669 infer_args,
670670 Some ( self_ty) ,
671- Some ( constness) ,
671+ constness,
672672 ) ;
673673
674674 let tcx = self . tcx ( ) ;
@@ -798,7 +798,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
798798 self_ty : Ty < ' tcx > ,
799799 trait_segment : & hir:: PathSegment < ' _ > ,
800800 is_impl : bool ,
801- constness : Option < ty:: BoundConstness > ,
801+ constness : ty:: BoundConstness ,
802802 ) -> ty:: TraitRef < ' tcx > {
803803 let ( substs, _) = self . create_substs_for_ast_trait_ref (
804804 span,
@@ -822,7 +822,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
822822 self_ty : Ty < ' tcx > ,
823823 trait_segment : & ' a hir:: PathSegment < ' a > ,
824824 is_impl : bool ,
825- constness : Option < ty:: BoundConstness > ,
825+ constness : ty:: BoundConstness ,
826826 ) -> ( SubstsRef < ' tcx > , GenericArgCountResult ) {
827827 self . complain_about_internal_fn_trait ( span, trait_def_id, trait_segment, is_impl) ;
828828
@@ -2129,7 +2129,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
21292129 self_ty,
21302130 trait_segment,
21312131 false ,
2132- Some ( constness) ,
2132+ constness,
21332133 ) ;
21342134
21352135 let item_substs = self . create_substs_for_associated_item (
@@ -2700,7 +2700,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
27002700 & GenericArgs :: none ( ) ,
27012701 true ,
27022702 None ,
2703- None ,
2703+ ty :: BoundConstness :: NotConst ,
27042704 ) ;
27052705 EarlyBinder ( self . normalize_ty ( span, tcx. at ( span) . type_of ( def_id) ) )
27062706 . subst ( tcx, substs)
0 commit comments