forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Capture precise paths in THIR and MIR #33
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…criptors Add the functions `recv_vectored_fds` and `send_vectored_fds` to send and receive file descriptors, by using `recvmsg` and `sendmsg` system call.
…OS list alphabetically
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
In particular, IntoIneerError only currently provides .error() which returns a reference, not an owned value. This is not helpful and means that a caller of BufWriter::into_inner cannot acquire an owned io::Error which seems quite wrong. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
…or,Wodann,m-ou-se Rename `AllocRef` to `Allocator` and `(de)alloc` to `(de)allocate` Calling `Box::alloc_ref` and `Vec::alloc_ref` sounds like allocating a reference. To solve this ambiguity, this renames `AllocRef` to `Allocator` and `alloc` to `allocate`. For a more detailed explaination see rust-lang/wg-allocators#76. closes rust-lang/wg-allocators#76 r? `@KodrAus` `@rustbot` modify labels: +A-allocators +T-libs `@rustbot` ping wg-allocators
…-ou-se Provide IntoInnerError::into_parts Hi. This is an updated version of the IntoInnerError bits of my previous portmanteau MR rust-lang#78689. Thanks to `@jyn514` and `@m-ou-se` for helpful comments there. I have made this insta-stable since it seems like it will probably be uncontroversial, but that is definitely something that someone from the libs API team should be aware of and explicitly consider. I included a tangentially-related commit providing documentation of the buffer full behaviiour of `&mut [u8] as Write`; the behaviour I am documenting is relied on by the doctest for `into_parts`.
Cleanup: move format! ui tests to where they belong
update Miri Fixes rust-lang#79709 Cc `@rust-lang/miri` r? `@ghost`
Don't leak return value after panic in drop Closes rust-lang#47949
…, r=oli-obk check the recursion limit when finding a struct's tail fixes rust-lang#79437 This does a `delay_span_bug` (via `ty_error_with_message`) rather than emit a new error message, under the assumption that there will be an error elsewhere (even if the type isn't infinitely recursive, just deeper than the recursion limit, this appears to be the case).
Ping me when nomicon's toolstate is broken So that I can notice the breakage easily.
- Derive TypeFoldable on `hir::place::Place` and associated structs, to them to be written into typeck results. Co-authored-by: Jennifer Wills <wills.jenniferg@gmail.com> Co-authored-by: Logan Mosier <logmosier@gmail.com>
- final_upvar_tys now reads types from places instead of using `node_ty` Co-authored-by: Roxane Fruytier <roxane.fruytier@hotmail.com>
097e490
to
487352b
Compare
- This allows us to delay figuring out the index of a capture in the closure structure when all projections to atleast form a capture have been applied to the builder Co-authored-by: Roxane Fruytier <roxane.fruytier@hotmail.com>
ef71437
to
ad36cd2
Compare
- Use closure_min_capture maps to capture precise paths - PlaceBuilder now searches for ancestors in min_capture list - Add API to `Ty` to allow access to the n-th element in a tuple in O(1) time. Co-authored-by: Roxane Fruytier <roxane.fruytier@hotmail.com>
- Closures now use closure_min_captures to figure out captured paths - Build upvar_mutbls using closure_min_captures - Change logic in limit_capture_mutability to differentiate b/w capturing parent's local variable or capturing a variable that is captured by the parent (in case of nested closure) using PlaceBase. Co-authored-by: Roxane Fruytier <roxane.fruytier@hotmail.com>
- Use closure_min_captures to generate the Upvar structure that stores information for diagnostics and information about mutability of captures.
ad36cd2
to
0f60e68
Compare
0f60e68
to
01df563
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR allows THIR and MIR to use the result of the new capture analysis to actually capture precise paths
Following test cases fail and have been disabled.
Work that remains (not in this PR):
This change is