error[E0220]: associated type `Cursor` not found for `Lexer` in the current scope --> $DIR/issue-109299-1.rs:10:40 | LL | struct Lexer(T); | --------------- associated item `Cursor` not found for this struct ... LL | type X = impl for Fn() -> Lexer::Cursor; | ^^^^^^ associated item not found in `Lexer` | = note: the associated type was found for - `Lexer` error: aborting due to previous error For more information about this error, try `rustc --explain E0220`.