-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Tracking issue for RFC 2229, "Closures Capture Disjoint Fields" #53488
Comments
IIRC, this needs to wait for the new MIR (NLL) borrow-checker to replace the old one. |
I would love to follow this through and give the code a shot, but it's probably too big of a first contribution to the compiler. Maybe I'll take a swing at some starter issues and then come back if no one else has gotten it done. @eddyb Yes, this definitely should be built on NLL. |
rust-lang#53488 Refactoring UpvarId
rust-lang#53488 Refactoring UpvarId
rust-lang#53488 Refactoring UpvarId
Rollup of 25 pull requests Successful merges: - #55562 (Add powerpc- and powerpc64-unknown-linux-musl targets) - #55564 (test/linkage-visibility: Ignore on musl targets) - #55827 (A few tweaks to iterations/collecting) - #55834 (Forward the ABI of the non-zero sized fields of an union if they have the same ABI) - #55857 (remove unused dependency) - #55862 (in which the E0618 "expected function" diagnostic gets a makeover) - #55867 (do not panic just because cargo failed) - #55894 (miri enum discriminant handling: Fix treatment of pointers, better error when it is undef) - #55916 (Make miri value visitor usfeful for mutation) - #55919 (core/tests/num: Simplify `test_int_from_str_overflow()` test code) - #55923 (reword #[test] attribute error on fn items) - #55935 (appveyor: Use VS2017 for all our images) - #55949 (ty: return impl Iterator from Predicate::walk_tys) - #55952 (Update to Clang 7 on CI.) - #55953 (#53488 Refactoring UpvarId) - #55962 (rustdoc: properly calculate spans for intra-doc link resolution errors) - #55963 (Stress test for MPSC) - #55968 (Clean up some non-mod-rs stuff.) - #55970 (Miri backtrace improvements) - #56007 (CTFE: dynamically make sure we do not call non-const-fn) - #56011 (Replace data.clone() by Arc::clone(&data) in mutex doc.) - #56012 (avoid shared ref in UnsafeCell::get) - #56016 (Add VecDeque::resize_with) - #56027 (docs: Add missing backtick in object_safety.rs docs) - #56043 (remove "approx env bounds" if we already know from trait) Failed merges: r? @ghost
rust-lang#53488 Refactoring UpvarId
Rollup of 25 pull requests Successful merges: - #55562 (Add powerpc- and powerpc64-unknown-linux-musl targets) - #55564 (test/linkage-visibility: Ignore on musl targets) - #55827 (A few tweaks to iterations/collecting) - #55834 (Forward the ABI of the non-zero sized fields of an union if they have the same ABI) - #55857 (remove unused dependency) - #55862 (in which the E0618 "expected function" diagnostic gets a makeover) - #55867 (do not panic just because cargo failed) - #55894 (miri enum discriminant handling: Fix treatment of pointers, better error when it is undef) - #55916 (Make miri value visitor useful for mutation) - #55919 (core/tests/num: Simplify `test_int_from_str_overflow()` test code) - #55923 (reword #[test] attribute error on fn items) - #55949 (ty: return impl Iterator from Predicate::walk_tys) - #55952 (Update to Clang 7 on CI.) - #55953 (#53488 Refactoring UpvarId) - #55962 (rustdoc: properly calculate spans for intra-doc link resolution errors) - #55963 (Stress test for MPSC) - #55968 (Clean up some non-mod-rs stuff.) - #55970 (Miri backtrace improvements) - #56007 (CTFE: dynamically make sure we do not call non-const-fn) - #56011 (Replace data.clone() by Arc::clone(&data) in mutex doc.) - #56012 (avoid shared ref in UnsafeCell::get) - #56016 (Add VecDeque::resize_with) - #56027 (docs: Add missing backtick in object_safety.rs docs) - #56043 (remove "approx env bounds" if we already know from trait) - #56059 (Increase `Duration` approximate equal threshold to 1us)
This is the first I've heard of Polonius having anything to do with self-referential types, despite having read all the blog posts and docs behind your link. Is this interaction spelled out somewhere? |
@Ixrec I do recall that there was a presentation from Niko that says it could maybe help with self-referential structs somehow, but he did preface it by saying that it's purely speculative: https://youtu.be/_agDeiWek8w?t=1900. |
I'm not really aware of any particular interaction between this feature and self-referential types. Am I missing something? |
@rustbot assign arora-aman |
Error: Parsing assign command in comment failed: ...'arora-aman' | error: user should start with @ at >| ''... Please let |
@rustbot assign @arora-aman |
@rustbot claim |
…matsakis rustc_typeck: construct {Closure,Generator}Substs more directly. We've previously not had a way to create `{Closure,Generator}Substs` other than instantiating all generics as inference variables and unifying the inference types (extracted using the regular `{Closure,Generator}Substs` accessors), with the actual types. With this PR, those hacks, and assumptions about the order of closure/generator-specific components, are replaced with a simple API where the base `Substs` are combined with the additional information into a `{Closure,Generator}Substs`. This might also be faster than relying inference, although probably not by much. r? @nikomatsakis cc rust-lang#53488 @blitzerr
…matsakis rustc_typeck: construct {Closure,Generator}Substs more directly. We've previously not had a way to create `{Closure,Generator}Substs` other than instantiating all generics as inference variables and unifying the inference types (extracted using the regular `{Closure,Generator}Substs` accessors), with the actual types. With this PR, those hacks, and assumptions about the order of closure/generator-specific components, are replaced with a simple API where the base `Substs` are combined with the additional information into a `{Closure,Generator}Substs`. This might also be faster than relying inference, although probably not by much. r? @nikomatsakis cc rust-lang#53488 @blitzerr
any update on this? Does the RFC has been implemented in rust? |
Yes it's available on the Rust nightly builds under On a somewhat side note we should probably update the tracking issue with the project board. |
Yes, please, RFC tracking issue should reveal whether it has been implemented, and how to use it 😃. I believe that someone have same concerns with me |
Stabilization proposed in #88126 |
Since this is now stabilized, should this issue be closed? |
Yes. |
This is a tracking issue for the RFC "Closures Capture Disjoint Fields" (rust-lang/rfcs#2229).
Status
This is under active development by the wg-rfc-2229 compiler-team working group. You can track their progress on the project-rfc-2229 repository.
Implementation plan and status
See the RFC 2229 project board and milestones.
Links, see also
Unresolved questions:
repr
, refinement typing)?Box
be special?This issue has been assigned to @arora-aman via this comment.
The text was updated successfully, but these errors were encountered: