Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nested rpit allows capturing illegal lifetimes #105251

Closed
aliemjay opened this issue Dec 4, 2022 · 1 comment · Fixed by #105254
Closed

nested rpit allows capturing illegal lifetimes #105251

aliemjay opened this issue Dec 4, 2022 · 1 comment · Fixed by #105254
Assignees
Labels
A-impl-trait Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch. C-bug Category: This is a bug. I-unsound Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.

Comments

@aliemjay
Copy link
Member

aliemjay commented Dec 4, 2022

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

@rustbot rustbot added A-impl-trait Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch. C-bug Category: This is a bug. I-unsound Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Dec 4, 2022
@cjgillot cjgillot self-assigned this Dec 4, 2022
@apiraino
Copy link
Contributor

apiraino commented Dec 5, 2022

WG-prioritization assigning priority (Zulip discussion).

@rustbot label -I-prioritize +P-high

@rustbot rustbot added P-high High priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Dec 5, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 5, 2022
Recurse into nested impl-trait when computing variance.

Fixes rust-lang#105251
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 5, 2022
Recurse into nested impl-trait when computing variance.

Fixes rust-lang#105251
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 5, 2022
Recurse into nested impl-trait when computing variance.

Fixes rust-lang#105251
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 6, 2022
Recurse into nested impl-trait when computing variance.

Fixes rust-lang#105251
@bors bors closed this as completed in ddb98e0 Dec 6, 2022
@compiler-errors compiler-errors added the T-types Relevant to the types team, which will review and decide on the PR/issue. label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-impl-trait Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch. C-bug Category: This is a bug. I-unsound Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants