GAT cannot infer implicit lifetime bounds. #62265
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-GATs
Area: Generic associated types (GATs)
A-lifetimes
Area: Lifetimes / regions
A-NLL
Area: Non-lexical lifetimes (NLL)
C-bug
Category: This is a bug.
F-generic_associated_types
`#![feature(generic_associated_types)]` a.k.a. GATs
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I'm trying to simulate closures returning mutable captured variable with GAT-version
FnMut
.It cannot infer implicit bound
'a: 'r
here and emit an error. But there isself: &'r mut Self
alive whileSelf
contains&'a mut i32
.The same type signature without GAT works well:
Playground
BTW: Returning
unimplemented!()
incall_mut
(the first one) will cause an ICE. Don't know if it is expected.The text was updated successfully, but these errors were encountered: