IAT: Reject implicit lifetime bounds of trait object types passed to inherent projections as indeterminate in ItemCtxts #141997
Labels
A-dyn-trait
Area: trait objects, vtable layout
A-lifetimes
Area: Lifetimes / regions
C-bug
Category: This is a bug.
F-inherent_associated_types
`#![feature(inherent_associated_types)]`
S-blocked
Status: Blocked on something else such as an RFC or other implementation work.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
This is for future-proofing / an extension of my efforts to make object lifetime defaulting more predictable & consistent across generic containers (see also #129543).
Examples that currently compile but ought not to:
Note that this shouldn't/doesn't affect cases where the trait object types has own bounds that can be used as they take precedence (which The Reference gets wrong, cc rust-lang/reference#1407). Example of something that isn't affected:
We need to set the ambient object lifetime default for inherent projections to
None
inresolve_bound_vars
, this way it'll be rejected later in ItemCtxts during HIR ty lowering."Problem" (the crux of the matter, actually): We don't have the resolution of TypeRelative paths in RBV, so arguably we should just do that for all unknown1 TypeRelative paths. I tried that already in #129543 and crater came back clean! I might just fix this issue in #129543 come to think about it.
Footnotes
https://github.com/rust-lang/rust/pull/129543#issuecomment-2872926835 ↩
The text was updated successfully, but these errors were encountered: