Skip to content
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

Upvar tuple #29

Open
wants to merge 121 commits into
base: closure-upvar-ty-tuple
Choose a base branch
from
Open

Upvar tuple #29

wants to merge 121 commits into from

Conversation

blitzerr
Copy link

  • Make ClosureSubsts return a tuple of the types (I re-did this to understand the code better).
  • Make GeneratorSubsts return a tuple of the types
  • Created a helper that returns an option of [Ty] to be used by the ppaux code for both generators and closures.

scottmcm and others added 30 commits December 1, 2018 16:35
Inspired by the recent conversation on IRLO.
Add @Centril's comment

Co-Authored-By: scottmcm <[email protected]>
CMake 3.4 and newer which is the required minimum version for LLVM
supports CMAKE_{C,CXX}_COMPILER_LAUNCHER for settting the compiler
launcher such as ccache which doesn't require shifting arguments.
Use fonts from the Roman 2.007 and Italic 1.007 version at:
https://github.com/adobe-fonts/source-serif-pro/releases/tag/2.007R-ro%2F1.007R-it

The following files are used from the distribution:

  * WOFF/TTF/SourceSerifPro-Regular.ttf.woff
  * WOFF/TTF/SourceSerifPro-Bold.ttf.woff
  * WOFF/TTF/SourceSerifPro-It.ttf.woff

These replace the older Source Serif Pro regular and bold fonts, and
the Heuristica italic font.
Adding a map to TypeckTables to get the list of all the Upvars
given a closureID. This is help us get rid of the recurring
pattern in the codebase of iterating over the free vars
using with_freevars.
Change the key of UpvarListMap from DefId to ast::NodeId
Centril and others added 29 commits January 12, 2019 10:55
Add a profiles section to the manifest

This supports the profiles work for Rustup in a backwards compatible manner.

r? @alexcrichton
Fix undefined behavior

From the [`MaybeUninit::get_mut` docs](https://doc.rust-lang.org/std/mem/union.MaybeUninit.html):
> It is up to the caller to guarantee that the the MaybeUninit really is in an initialized state, otherwise this will immediately cause undefined behavior.

r? @joshtriplett
Correct RELEASES.md for 1.32.0

The `into_to_from_bytes` feature was stabilized for `i128` and `u128` just like for the other integer types, but they seem to have been missed.
don't unwrap unexpected tokens in `format!`

Fixes rust-lang#57512.
…rns, r=Centril

Stabilise irrefutable if-let and while-let patterns

This stabilises RFC 2086 (rust-lang#44495).

This replaces rust-lang#55639, as we want to stabilise this in time for the beta cut-off.

Closes rust-lang#55639.

r? @Centril
Rollup of 26 pull requests

Successful merges:

 - rust-lang#56425 (Redo the docs for Vec::set_len)
 - rust-lang#56906 (Issue rust-lang#56905)
 - rust-lang#57042 (Don't call `FieldPlacement::count` when count is too large)
 - rust-lang#57175 (Stabilize `let` bindings and destructuring in constants and const fn)
 - rust-lang#57192 (Change std::error::Error trait documentation to talk about `source` instead of `cause`)
 - rust-lang#57296 (Fixed the link to the ? operator)
 - rust-lang#57368 (Use CMAKE_{C,CXX}_COMPILER_LAUNCHER for ccache)
 - rust-lang#57400 (Rustdoc: update Source Serif Pro and replace Heuristica italic)
 - rust-lang#57417 (rustdoc: use text-based doctest parsing if a macro is wrapping main)
 - rust-lang#57433 (Add link destination for `read-ownership`)
 - rust-lang#57434 (Remove `CrateNum::Invalid`.)
 - rust-lang#57441 (Supporting backtrace for x86_64-fortanix-unknown-sgx.)
 - rust-lang#57450 (actually take a slice in this example)
 - rust-lang#57459 (Reference tracking issue for inherent associated types in diagnostic)
 - rust-lang#57463 (docs: Fix some 'second-edition' links)
 - rust-lang#57466 (Remove outdated comment)
 - rust-lang#57493 (use structured suggestion when casting a reference)
 - rust-lang#57498 (make note of one more normalization that Paths do)
 - rust-lang#57499 (note that FromStr does not work for borrowed types)
 - rust-lang#57505 (Remove submodule step from README)
 - rust-lang#57510 (Add a profiles section to the manifest)
 - rust-lang#57511 (Fix undefined behavior)
 - rust-lang#57519 (Correct RELEASES.md for 1.32.0)
 - rust-lang#57522 (don't unwrap unexpected tokens in `format!`)
 - rust-lang#57530 (Fixing a typographical error.)
 - rust-lang#57535 (Stabilise irrefutable if-let and while-let patterns)

Failed merges:

r? @ghost
…5 edition

...while still keeping ambiguity errors future-proofing for uniform paths.
This corner case is not going to be stabilized for 1.32 and needs some more general experiments about retrofitting 2018 import rules to 2015 edition
Add some tests for buggy derive helpers
Stabilize `uniform_paths`

Address all the things described in rust-lang#56417.

Assign visibilities to `macro_rules` items - `pub` to `macro_export`-ed macros and `pub(crate)` to non-exported macros, these visibilities determine how far these macros can be reexported with `use`.

Prohibit use of reexported inert attributes and "tool modules", after renaming (e.g. `use inline as imported_inline`) their respective tools and even compiler passes won't be able to recognize and properly check them.

Also turn use of uniform paths in 2015 macros into an error, I'd prefer to neither remove nor stabilize them right away because I still want to make some experiments in this area (uniform path fallback was added to 2015 macros used on 2018 edition in rust-lang#56053 (comment)).

UPDATE: The last commit also stabilizes the feature `uniform_paths`.

Closes rust-lang#53130
Closes rust-lang#55618
Closes rust-lang#56326
Closes rust-lang#56398
Closes rust-lang#56417
Closes rust-lang#56821
Closes rust-lang#57252
Closes rust-lang#57422
…ubstitutions.

Related to sub issue #57482, main issue rust-lang#53488.
… substitutions.

Related to sub issue #57482, main issue rust-lang#53488.
… not inferred

It was safe for the ppaux code to call the upvar_tys but not anymore
after the change wraping the upvar types in a tuple as this can panic
if called from parts when the types are yet to be bound. This patch
therefore creates a helper, that returns an Option and ppaux can call
the new helper instead.
Main issue rust-lang#53488, sub-issue #57482
Related to  #57482
This patch addresses the returning of a slice of &'tcx[Ty<'tcx>]
from the upvar_tys function as it is more easy on the eyes.
Cleanups related to #57482
We changed it to return a slice.
Cleanups related to #57482
also change `ClosureSubsts` and upvar inference code to match.
…ar-uple change

Representing closures as a tuple of upvar types adds a line in error reporting
as it adds an extra step of obtaining the upvar list from the tuple and hence an
extra line was spit out by the compiler while error reporting. This removes that.
In cases the upvars were not inferred, we were exiting out of the loop earlier.
This chang checks, if the upvar is inferred it prints it, or else it prints
a _.
nikomatsakis pushed a commit that referenced this pull request Sep 25, 2019
remove rtp.rs and move rtpSpawn, RTP_ID_ERROR to libc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.