File tree 2 files changed +6
-10
lines changed
librustc_trait_selection/traits
2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -151,15 +151,11 @@ impl Elaborator<'tcx> {
151
151
152
152
fn elaborate ( & mut self , obligation : & PredicateObligation < ' tcx > ) {
153
153
let tcx = self . visited . tcx ;
154
- let pred = match obligation. predicate . kind ( ) {
155
- // We have to be careful and rebind this when
156
- // dealing with a predicate further down.
157
- ty:: PredicateKind :: ForAll ( binder) => binder. skip_binder ( ) . kind ( ) ,
158
- pred => pred,
159
- } ;
160
-
161
- match pred {
162
- ty:: PredicateKind :: ForAll ( _) => bug ! ( "unexpected predicate: {:?}" , pred) ,
154
+
155
+ match obligation. predicate . ignore_qualifiers ( tcx) . skip_binder ( ) . kind ( ) {
156
+ ty:: PredicateKind :: ForAll ( _) => {
157
+ bug ! ( "unexpected predicate: {:?}" , obligation. predicate)
158
+ }
163
159
ty:: PredicateKind :: Trait ( data, _) => {
164
160
// Get predicates declared on the trait.
165
161
let predicates = tcx. super_predicates_of ( data. def_id ( ) ) ;
Original file line number Diff line number Diff line change @@ -763,7 +763,7 @@ impl AutoTraitFinder<'tcx> {
763
763
}
764
764
}
765
765
Ok ( None ) => {
766
- // It's ok not to make progress when hvave no inference variables -
766
+ // It's ok not to make progress when have no inference variables -
767
767
// in that case, we were only performing unifcation to check if an
768
768
// error occurred (which would indicate that it's impossible for our
769
769
// type to implement the auto trait).
You can’t perform that action at this time.
0 commit comments