@@ -65,7 +65,6 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
65
65
trait_bounds. push ( (
66
66
bound_pred. rebind ( trait_pred. trait_ref ) ,
67
67
span,
68
- trait_pred. constness ,
69
68
) ) ;
70
69
}
71
70
ty:: ClauseKind :: Projection ( proj) => {
@@ -86,7 +85,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
86
85
// Expand trait aliases recursively and check that only one regular (non-auto) trait
87
86
// is used and no 'maybe' bounds are used.
88
87
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) ) ) ;
90
89
91
90
let ( mut auto_traits, regular_traits) : ( Vec < _ > , Vec < _ > ) = expanded_traits
92
91
. filter ( |i| i. trait_ref ( ) . self_ty ( ) . skip_binder ( ) == dummy_self)
@@ -126,7 +125,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
126
125
if regular_traits. is_empty ( ) && auto_traits. is_empty ( ) {
127
126
let trait_alias_span = trait_bounds
128
127
. iter ( )
129
- . map ( |& ( trait_ref, _, _ ) | trait_ref. def_id ( ) )
128
+ . map ( |& ( trait_ref, _) | trait_ref. def_id ( ) )
130
129
. find ( |& trait_ref| tcx. is_trait_alias ( trait_ref) )
131
130
. map ( |trait_ref| tcx. def_span ( trait_ref) ) ;
132
131
let reported =
@@ -157,10 +156,11 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
157
156
158
157
let regular_traits_refs_spans = trait_bounds
159
158
. 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 ( ) ) ) ;
161
160
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);
164
164
let base_pred: ty:: Predicate < ' tcx > = base_trait_ref. to_predicate ( tcx) ;
165
165
for pred in traits:: elaborate ( tcx, [ base_pred] ) {
166
166
debug ! ( "conv_object_ty_poly_trait_ref: observing object predicate `{:?}`" , pred) ;
0 commit comments