Rollup merge of #87281 - rust-lang:issue-81487, r=nikomatsakis

Normalize generic_ty before checking if bound is met

Fixes #81487

r? `@nikomatsakis`
This commit is contained in:
Guillaume Gomez 2021-07-22 13:39:21 +02:00 committed by GitHub
commit e16d023a5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View file

@ -638,6 +638,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
let sub = var_data.normalize(self.tcx(), verify.region);
let verify_kind_ty = verify.kind.to_ty(self.tcx());
let verify_kind_ty = var_data.normalize(self.tcx(), verify_kind_ty);
if self.bound_is_met(&verify.bound, var_data, verify_kind_ty, sub) {
continue;
}