-
Notifications
You must be signed in to change notification settings - Fork 13k
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
MIR-borrowck: Add support for union
types
#44831
Comments
Transcription of relevant tests according to the discrepancy spreadsheet. (caveat: data is based on out-of-date pnkfelix/mir-borrowck4 branch)
|
I'm interested in tackling this. |
So I think a useful first step would be to integrate the spec for borrowing unions here: into the main borrowck spec (yes I know it's called "nll", but it also applies to MIR borrowck) - preferably as a PR against rust-lang/rfcs: From that, we should be able to see what changes need to be done to the borrow-checker implementation and do them. |
PR to make changes to the RFC: rust-lang/rfcs#2174 |
Fixes rust-lang#44831. Fixes rust-lang#44834. Fixes rust-lang#45537. Fixes rust-lang#45696 (by implementing DerefPure semantics, which is what we want going forward).
MIR borrowck: implement union-and-array-compatible semantics Fixes #44831. Fixes #44834. Fixes #45537. Fixes #45696 (by implementing DerefPure semantics, which is what we want going forward). r? @nikomatsakis
@arielb1 You left a note when ignoring this test: rust/src/test/compile-fail/borrowck/borrowck-thread-local-static-borrow-outlives-fn.rs Lines 10 to 24 in cf30759
When / under what conditions will this be fixed? Can we make an issue to track it or a more descriptive comment, so future issue triage knows what's going on? |
The bug that forced the test to be ignored had been fixed, but I forgot to un-ignore the test. Feel free to un-ignore it yourself :-). |
Unignores a test that has been fixed. See rust-lang#44831
Submitted a PR. Thanks! |
…ielb1 Unignore borrowck test Unignores a test that has been fixed. See #44831
…gnore, r=arielb1 Unignore borrowck test Unignores a test that has been fixed. See rust-lang#44831
The MIR-borrowck prototype code left out support for
union
. Luckily we have test cases that illustrate the omission.So the next step is to incorporate support for
union
intolibrustc_mir/borrow_check.rs
.The text was updated successfully, but these errors were encountered: