Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions compiler/rustc_borrowck/src/type_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,7 @@ impl<'a, 'b, 'tcx> TypeVerifier<'a, 'b, 'tcx> {
},
ProjectionElem::Field(field, fty) => {
let fty = self.sanitize_type(place, fty);
let fty = self.cx.normalize(fty, location);
match self.field_ty(place, base, field, location) {
Ok(ty) => {
let ty = self.cx.normalize(ty, location);
Expand Down
25 changes: 25 additions & 0 deletions src/test/ui/generic-associated-types/issue-93141.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// check-pass

#![feature(generic_associated_types)]

pub trait Fooey: Sized {
type Context<'c> where Self: 'c;
}

pub struct Handle<E: Fooey>(Option<Box<dyn for<'c> Fn(&mut E::Context<'c>)>>);

fn tuple<T>() -> (Option<T>,) { (Option::None,) }

pub struct FooImpl {}
impl Fooey for FooImpl {
type Context<'c> = &'c ();
}

impl FooImpl {
pub fn fail1() -> Handle<Self> {
let (tx,) = tuple();
Handle(tx)
}
}

fn main() {}