Repository navigation
Min TAIT + GAT lifetime issue #86218
Copy link
Copy link
Closed
Labels
A-GATsArea: Generic associated types (GATs)Area: Generic associated types (GATs)A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsC-bugCategory: This is a bug.Category: This is a bug.F-generic_associated_types`#![feature(generic_associated_types)]` a.k.a. GATs`#![feature(generic_associated_types)]` a.k.a. GATsF-type_alias_impl_trait`#[feature(type_alias_impl_trait)]``#[feature(type_alias_impl_trait)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Description
I tried this code:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=71e56b49edea6de440eed3a417322308
Code that is an equivalent to the one above, but that compiles: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=f071b171eda8921c1d4902999417594d
I'm not sure about the exact reason for this to happen, but I can suspect the presence of an additional lifetime in impl block that is causing this bug.
I expected to see this happen: It compiles
Instead, this happened: Lifetime error
Meta
rustc --version --verbose: Latest playground version
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-GATsArea: Generic associated types (GATs)Area: Generic associated types (GATs)A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsC-bugCategory: This is a bug.Category: This is a bug.F-generic_associated_types`#![feature(generic_associated_types)]` a.k.a. GATs`#![feature(generic_associated_types)]` a.k.a. GATsF-type_alias_impl_trait`#[feature(type_alias_impl_trait)]``#[feature(type_alias_impl_trait)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Type
Projects
- StatusShow more project fieldsDone
Activity
ivan770 commentedon Jun 13, 2021
@rustbot label +T-compiler +F-type_alias_impl_trait +F-generic_associated_types +A-lifetimes +requires-nightly
b-naber commentedon Jun 16, 2021
@rustbot claim
jackh726 commentedon Oct 23, 2021
Updated and minimized example:
jackh726 commentedon Oct 23, 2021
Yeah, so somehow
'ais ending up in the substs for the opaque typeimpl Stream<Item = i32> + 's, and that isn't able to be proven.jackh726 commentedon Oct 23, 2021
GATs issue triage: not blocking. This requires the
type_alias_impl_traitfeature and seems to revolve around the substs for them, rather than a GATs issue.oli-obk commentedon Mar 31, 2022
@b-naber this issue has been fixed as a side effect of #95474
Auto merge of rust-lang#95474 - oli-obk:tait_ub, r=jackh726