@@ -65,7 +65,6 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
6565 trait_bounds. push ( (
6666 bound_pred. rebind ( trait_pred. trait_ref ) ,
6767 span,
68- trait_pred. constness ,
6968 ) ) ;
7069 }
7170 ty:: ClauseKind :: Projection ( proj) => {
@@ -86,7 +85,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
8685 // Expand trait aliases recursively and check that only one regular (non-auto) trait
8786 // is used and no 'maybe' bounds are used.
8887 let expanded_traits =
89- traits:: expand_trait_aliases ( tcx, trait_bounds. iter ( ) . map ( |& ( a, b, _ ) | ( a, b) ) ) ;
88+ traits:: expand_trait_aliases ( tcx, trait_bounds. iter ( ) . map ( |& ( a, b) | ( a, b) ) ) ;
9089
9190 let ( mut auto_traits, regular_traits) : ( Vec < _ > , Vec < _ > ) = expanded_traits
9291 . filter ( |i| i. trait_ref ( ) . self_ty ( ) . skip_binder ( ) == dummy_self)
@@ -126,7 +125,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
126125 if regular_traits. is_empty ( ) && auto_traits. is_empty ( ) {
127126 let trait_alias_span = trait_bounds
128127 . iter ( )
129- . map ( |& ( trait_ref, _, _ ) | trait_ref. def_id ( ) )
128+ . map ( |& ( trait_ref, _) | trait_ref. def_id ( ) )
130129 . find ( |& trait_ref| tcx. is_trait_alias ( trait_ref) )
131130 . map ( |trait_ref| tcx. def_span ( trait_ref) ) ;
132131 let reported =
@@ -157,10 +156,11 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
157156
158157 let regular_traits_refs_spans = trait_bounds
159158 . into_iter ( )
160- . filter ( |( trait_ref, _, _ ) | !tcx. trait_is_auto ( trait_ref. def_id ( ) ) ) ;
159+ . filter ( |( trait_ref, _) | !tcx. trait_is_auto ( trait_ref. def_id ( ) ) ) ;
161160
162- for ( base_trait_ref, span, constness) in regular_traits_refs_spans {
163- assert_eq ! ( constness, ty:: BoundConstness :: NotConst ) ;
161+ for ( base_trait_ref, span) in regular_traits_refs_spans {
162+ // TODO?
163+ //assert_eq!(constness, ty::BoundConstness::NotConst);
164164 let base_pred: ty:: Predicate < ' tcx > = base_trait_ref. to_predicate ( tcx) ;
165165 for pred in traits:: elaborate ( tcx, [ base_pred] ) {
166166 debug ! ( "conv_object_ty_poly_trait_ref: observing object predicate `{:?}`" , pred) ;
0 commit comments