Repository navigation
NLL and closures: higher-ranked lifetime bounds are not enforced in type tests #98693
Copy link
Copy link
Closed
Closed
Copy link
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)C-bugCategory: This is a bug.Category: This is a bug.I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessP-criticalCritical priorityCritical priorityT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Milestone
Description
Activity
- addedA-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)C-bugCategory: This is a bug.Category: This is a bug.I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundnessregression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}Issue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
on Jun 29, 2022 I guess it would be an easy fix
@rustbot claimThe unsoundness exploitation in #98095 can easily be adapted for this issue, so it is in fact a soundness issue: playground
- addedI-types-nominatedNominated for discussion during a types team meeting.Nominated for discussion during a types team meeting.
on Jun 30, 2022 issue touched in today's T-compiler meeting, notes from Zulip chat. Will also be discussed tomorrow during the T-types meeting.
WG-prioritization assigning priority (Zulip discussion).
@rustbot label -I-prioritize +P-critical
- addedP-criticalCritical priorityCritical priorityand removedI-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}Issue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
on Jul 4, 2022 - added 2 commits that reference this issue
on Jul 10, 2022 - removedI-types-nominatedNominated for discussion during a types team meeting.Nominated for discussion during a types team meeting.
on Jul 29, 2022
Metadata
Metadata
Assignees
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)C-bugCategory: This is a bug.Category: This is a bug.I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessP-criticalCritical priorityCritical priorityT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
This code compiles after #95565 although it shouldn't: (playground)
This is similar to #98095 in that we're not taking into account placeholder regions when "promoting" type-tests from the closure to its caller:
rust/compiler/rustc_borrowck/src/region_infer/mod.rs
Line 940 in ddcbba0
@rustbot label T-types regression-from-stable-to-beta C-bug A-NLL I-unsound