-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
repeated TAIT doesn't detect lifetime conflict #86465
Labels
A-trait-system
Area: Trait system
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
WG-traits
Working group: Traits, https://internals.rust-lang.org/t/announcing-traits-working-group/6804
Comments
@rustbot assign @spastorino |
@rustbot assign @nikomatsakis I have been working on this. It might also make sense to assign to @oli-obk instead though. |
In progress PR: #86410 |
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Jul 21, 2021
…pes, r=spastorino Make mir borrowck's use of opaque types independent of the typeck query's result fixes rust-lang#87218 fixes rust-lang#86465 we used to use the typeck results only to generate an obligation for the mir borrowck type to be equal to the typeck result. When i removed the `fixup_opaque_types` function in rust-lang#87200, I exposed a bug that showed that mir borrowck can't doesn't get enough information from typeck in order to build the correct lifetime mapping from opaque type usage to the actual concrete type. We therefor now fully compute the information within mir borrowck (we already did that, but we only used it to verify the typeck result) and stop using the typeck information. We will likely be able to remove most opaque type information from the borrowck results in the future and just have all current callers use the mir borrowck result instead. r? `@spastorino`
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Jul 21, 2021
…pes, r=spastorino Make mir borrowck's use of opaque types independent of the typeck query's result fixes rust-lang#87218 fixes rust-lang#86465 we used to use the typeck results only to generate an obligation for the mir borrowck type to be equal to the typeck result. When i removed the `fixup_opaque_types` function in rust-lang#87200, I exposed a bug that showed that mir borrowck can't doesn't get enough information from typeck in order to build the correct lifetime mapping from opaque type usage to the actual concrete type. We therefor now fully compute the information within mir borrowck (we already did that, but we only used it to verify the typeck result) and stop using the typeck information. We will likely be able to remove most opaque type information from the borrowck results in the future and just have all current callers use the mir borrowck result instead. r? ``@spastorino``
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this issue
Jul 23, 2021
…i-obk VecMap::get_value_matching should return just one element r? `@nikomatsakis` Related to rust-lang#86465 and rust-lang#87287
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-trait-system
Area: Trait system
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
WG-traits
Working group: Traits, https://internals.rust-lang.org/t/announcing-traits-working-group/6804
This code compiles, but it should not:
The function creates two constraints:
X<'t, 'u> = &'t u32
, which meanstype X<'a, 'b> = &'a u32
X<'u, 't> = &'t u32
, which meanstype X<'a, 'b> = &'b u32
These should not both be satisfiable!
The text was updated successfully, but these errors were encountered: