File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed
librustc_trait_selection/traits Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -151,15 +151,11 @@ impl Elaborator<'tcx> {
151151
152152 fn elaborate ( & mut self , obligation : & PredicateObligation < ' tcx > ) {
153153 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+ }
163159 ty:: PredicateKind :: Trait ( data, _) => {
164160 // Get predicates declared on the trait.
165161 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> {
763763 }
764764 }
765765 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 -
767767 // in that case, we were only performing unifcation to check if an
768768 // error occurred (which would indicate that it's impossible for our
769769 // type to implement the auto trait).
You can’t perform that action at this time.
0 commit comments