@@ -62,11 +62,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
6262 match bound_pred. skip_binder ( ) {
6363 ty:: ClauseKind :: Trait ( trait_pred) => {
6464 assert_eq ! ( trait_pred. polarity, ty:: ImplPolarity :: Positive ) ;
65- trait_bounds. push ( (
66- bound_pred. rebind ( trait_pred. trait_ref ) ,
67- span,
68- trait_pred. constness ,
69- ) ) ;
65+ trait_bounds. push ( ( bound_pred. rebind ( trait_pred. trait_ref ) , span) ) ;
7066 }
7167 ty:: ClauseKind :: Projection ( proj) => {
7268 projection_bounds. push ( ( bound_pred. rebind ( proj) , span) ) ;
@@ -86,7 +82,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
8682 // Expand trait aliases recursively and check that only one regular (non-auto) trait
8783 // is used and no 'maybe' bounds are used.
8884 let expanded_traits =
89- traits:: expand_trait_aliases ( tcx, trait_bounds. iter ( ) . map ( |& ( a, b, _ ) | ( a, b) ) ) ;
85+ traits:: expand_trait_aliases ( tcx, trait_bounds. iter ( ) . map ( |& ( a, b) | ( a, b) ) ) ;
9086
9187 let ( mut auto_traits, regular_traits) : ( Vec < _ > , Vec < _ > ) = expanded_traits
9288 . filter ( |i| i. trait_ref ( ) . self_ty ( ) . skip_binder ( ) == dummy_self)
@@ -126,7 +122,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
126122 if regular_traits. is_empty ( ) && auto_traits. is_empty ( ) {
127123 let trait_alias_span = trait_bounds
128124 . iter ( )
129- . map ( |& ( trait_ref, _, _ ) | trait_ref. def_id ( ) )
125+ . map ( |& ( trait_ref, _) | trait_ref. def_id ( ) )
130126 . find ( |& trait_ref| tcx. is_trait_alias ( trait_ref) )
131127 . map ( |trait_ref| tcx. def_span ( trait_ref) ) ;
132128 let reported =
@@ -157,10 +153,9 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
157153
158154 let regular_traits_refs_spans = trait_bounds
159155 . into_iter ( )
160- . filter ( |( trait_ref, _, _ ) | !tcx. trait_is_auto ( trait_ref. def_id ( ) ) ) ;
156+ . filter ( |( trait_ref, _) | !tcx. trait_is_auto ( trait_ref. def_id ( ) ) ) ;
161157
162- for ( base_trait_ref, span, constness) in regular_traits_refs_spans {
163- assert_eq ! ( constness, ty:: BoundConstness :: NotConst ) ;
158+ for ( base_trait_ref, span) in regular_traits_refs_spans {
164159 let base_pred: ty:: Predicate < ' tcx > = base_trait_ref. to_predicate ( tcx) ;
165160 for pred in traits:: elaborate ( tcx, [ base_pred] ) {
166161 debug ! ( "conv_object_ty_poly_trait_ref: observing object predicate `{:?}`" , pred) ;
0 commit comments