Closed
Description
The following compiles on the current nightly (1.67.0-nightly (2022-12-03 2341517)) although it shouldn't:
fn test<'s: 's>(s: &'s str) -> impl std::future::Future<Output = impl Sized> {
async move { let _s = s; }
}
It is correctly rejected by the current beta: 1.66.0-beta.2 (2022-11-20 0040709).
This is most likely #103491 (I haven't bisected though!). Cc @cjgillot.
@rustbot label C-bug T-compiler I-unsound regression-from-stable-to-nightly A-impl-trait
Metadata
Metadata
Assignees
Labels
Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Category: This is a bug.Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessHigh priorityRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.Performance or correctness regression from stable to nightly.