-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustc_typeck: construct {Closure,Generator}Substs more directly. #74314
Conversation
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit 5533705 with merge 994616d7663772c32c9ad592d445f68a21fcc155... |
☀️ Try build successful - checks-actions, checks-azure |
Queued 994616d7663772c32c9ad592d445f68a21fcc155 with parent 9d09331, future comparison URL. |
Finished benchmarking try commit (994616d7663772c32c9ad592d445f68a21fcc155): comparison url. |
Yeah, it's neutral, no big surprise there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a more readable version. r=me if you fix your own FIXMEs to rename things, but did you want to hold off to avoid conflicting with @davidtwco's polymorphization PR?
@nikomatsakis Yeah, let's land polymorphization first, it's slightly cleaner than this PR anyway. |
marking it blocked based on author's comment |
@Dylan-DPC #69749 had already landed by the time the label was added. |
5533705
to
3ad05c2
Compare
ah sweet race condition :D |
3ad05c2
to
f5a0896
Compare
f5a0896
to
5d44d54
Compare
@bors r=nikomatsakis |
📌 Commit 5d44d54 has been approved by |
…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
Rollup of 10 pull requests Successful merges: - rust-lang#74204 (Don't visit foreign function bodies when lowering ast to hir) - rust-lang#74314 (rustc_typeck: construct {Closure,Generator}Substs more directly.) - rust-lang#74346 (Use LocalDefId instead of HirId for reachable_set elements.) - rust-lang#74399 (Move DelaySpanBugEmitted to ty::context) - rust-lang#75177 (Add regression test for issue-66768) - rust-lang#75223 (Add #[track_caller] to `Session::delay_span_bug`) - rust-lang#75423 (Move to intra-doc links for /library/core/src/hint.rs) - rust-lang#75485 (pin docs: add some forward references) - rust-lang#75569 (Bump minor version of emsdk to 1.38.47) - rust-lang#75596 (Switch to intra-doc links in /sys/windows/ext/{ffi,fs,process}.rs) Failed merges: r? @ghost
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 #53488 @blitzerr