Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 6 pull requests #87366

Merged
merged 17 commits into from
Jul 22, 2021
Merged
Changes from 2 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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;
}
19 changes: 19 additions & 0 deletions src/test/ui/generic-associated-types/issue-81487.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// build-pass

#![feature(generic_associated_types)]

trait Trait {
type Ref<'a>;
}

impl Trait for () {
type Ref<'a> = &'a i8;
}

struct RefRef<'a, T: Trait>(&'a <T as Trait>::Ref<'a>);

fn wrap<'a, T: Trait>(reff: &'a <T as Trait>::Ref<'a>) -> RefRef<'a, T> {
RefRef(reff)
}

fn main() {}