},
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);
--- /dev/null
+// 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() {}