Unconstrained lifetimes are allowed on return-position-impl-trait-in-trait impl methods #109468
Labels
C-bug
Category: This is a bug.
F-return_position_impl_trait_in_trait
`#![feature(return_position_impl_trait_in_trait)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen: Fails saying something about unconstrained lifetime parameters
Instead, this happened: Passes 😢
We'll just have to generalize
enforce_impl_params_are_constrained
to check RPITITs too.I haven't made a test that actually turns this into an unsoundness, or even really thought if it's unsound, but if conceptually RPITITs are supposed to act like anonymous associated types, this probably shouldn't pass.
The text was updated successfully, but these errors were encountered: