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

Rollup of 6 pull requests #93085

Merged
merged 32 commits into from
Jan 20, 2022
Merged

Rollup of 6 pull requests #93085

merged 32 commits into from
Jan 20, 2022

Commits on Jan 6, 2022

  1. Configuration menu
    Copy the full SHA
    a043acd View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2022

  1. Configuration menu
    Copy the full SHA
    731bbae View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2022

  1. Configuration menu
    Copy the full SHA
    6a1f9e6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1b8daf8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    333a5cc View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2022

  1. Add manifest docs fallback.

    ehuss committed Jan 17, 2022
    Configuration menu
    Copy the full SHA
    3c0fb7f View commit details
    Browse the repository at this point in the history
  2. Remove VERSION from manifest readme docs.

    The version was removed in rust-lang#77145
    ehuss committed Jan 17, 2022
    Configuration menu
    Copy the full SHA
    52fdd2d View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2022

  1. Disable docs on aarch64-apple-darwin.

    This builder is the slowest in the fleet. This should cut a considerable
    amount of time. The manifest should now include the docs from
    x86_64-apple-darwin. Although those docs are slightly different, it
    should be close enough. When aarch64-apple-darwin heads towards tier 1,
    we can revisit whether or not to re-enable the docs.
    ehuss committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    6a1099c View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2022

  1. Configuration menu
    Copy the full SHA
    fdb95f5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e219b2b View commit details
    Browse the repository at this point in the history
  3. Simplify ring buffer pushes

    dtolnay committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    50d722a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e20d5ab View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2a14275 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ae28ec5 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    80139a0 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    947a09a View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0490e43 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    a37d272 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    377c9db View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    fe5c4ea View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    6e8b060 View commit details
    Browse the repository at this point in the history
  14. Eliminate eof token state

    dtolnay committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    cc66a7f View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    4d3faae View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    48f5dca View commit details
    Browse the repository at this point in the history
  17. remove is_noop

    lcnr committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    4bd571c View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    c8e6889 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#92316 - petrochenkov:extmangle, r=wesleywiser

    mangling_v0: Skip extern blocks during mangling
    
    There's no need to include the dummy `Nt` into the symbol name, items in extern blocks belong to their parent modules for all purposes except for inheriting the ABI and attributes.
    
    Follow up to rust-lang#92032
    
    (There's also a drive-by fix to the `rust-demangler` tool's tests, which don't run on CI, I initially attempted using them for testing this PR.)
    matthiaskrgr authored Jan 19, 2022
    Configuration menu
    Copy the full SHA
    715cda2 View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#92630 - steffahn:lift_bounds_on_BuildHasher…

    …Default, r=yaahc
    
    Change PhantomData type for `BuildHasherDefault` (and more)
    
    Changes `PhantomData<H>` to `PhantomData<fn() -> H>` for `BuildHasherDefault`. This preserves the covariance of `H`, while it lifts the currently inferred unnecessary bounds like [`H: Send` for `BuildHasherDefault<H>: Send`](https://doc.rust-lang.org/1.57.0/std/hash/struct.BuildHasherDefault.html#impl-Send), etc.
    
    _Edit:_ Also does a similar change for `iter::Empty` and `future::Pending`.
    matthiaskrgr authored Jan 19, 2022
    Configuration menu
    Copy the full SHA
    dfbb6b2 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#92800 - ehuss:docs-fallback, r=Mark-Simulacrum

    Add manifest docs fallback.
    
    This adds a fallback so that the rustup manifest will contain the rust-docs component for all hosts. There is a mapping so that the docs that get downloaded are roughly close to the actual host. There inevitably will be things that don't match. Ideally the standard library docs would be the same for every platform (`cfg(doc)` goes a long way towards this), but there are still lots of minor differences.
    
    Closes rust-lang#69525
    matthiaskrgr authored Jan 19, 2022
    Configuration menu
    Copy the full SHA
    bcb093e View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#93005 - GuillaumeGomez:templates-in-html, r…

    …=notriddle
    
    Move back templates into html folder
    
    Follow-up of rust-lang#92526.
    
    r? `@notriddle`
    matthiaskrgr authored Jan 19, 2022
    Configuration menu
    Copy the full SHA
    623791d View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#93065 - dtolnay:ringbuffer, r=lcnr

    Pretty printer algorithm revamp step 2
    
    This PR follows rust-lang#92923 as a second chunk of modernizations backported from https:/dtolnay/prettyplease into rustc_ast_pretty.
    
    I've broken this up into atomic commits that hopefully are sensible in isolation. At every commit, the pretty printer is compilable and has runtime behavior that is identical to before and after the PR. None of the refactoring so far changes behavior.
    
    The general theme of this chunk of commits is: the logic in the old pretty printer is doing some very basic things (pushing and popping tokens on a ring buffer) but expressed in a too-low-level way that I found makes it quite complicated/subtle to reason about. There are a number of obvious invariants that are "almost true" -- things like `self.left == self.buf.offset` and `self.right == self.buf.offset + self.buf.data.len()` and `self.right_total == self.left_total + self.buf.data.sum()`. The reason these things are "almost true" is the implementation tends to put updating one side of the invariant unreasonably far apart from updating the other side, leaving the invariant broken while unrelated stuff happens in between. The following code from master is an example of this:
    
    https:/rust-lang/rust/blob/e5e2b0be26ea177527b60d355bd8f56cd473bd00/compiler/rustc_ast_pretty/src/pp.rs#L314-L317
    
    In this code the `advance_right` is reserving an entry into which to write a next token on the right side of the ring buffer, the `check_stack` is doing something totally unrelated to the right boundary of the ring buffer, and the `scan_push` is actually writing the token we previously reserved space for. Much of what this PR is doing is rearranging code to shrink the amount of stuff in between when an invariant is broken to when it is restored, until the whole thing can be factored out into one indivisible method call on the RingBuffer type.
    
    The end state of the PR is that we can entirely eliminate `self.left` (because it's now just equal to `self.buf.offset` always) and `self.right` (because it's equal to `self.buf.offset + self.buf.data.len()` always) and the whole `Token::Eof` state which used to be the value of tokens that have been reserved space for but not yet written.
    
    I found without these changes the pretty printer implementation to be hard to reason about and I wasn't able to confidently introduce improvements like trailing commas in `prettyplease` until after this refactor. The logic here is 43 years old at this point (Graydon translated it as directly as possible from the 1979 pretty printing paper) and while there are advantages to following the paper as closely as possible, in `prettyplease` I decided if we're going to adapt the algorithm to work better for Rust syntax, it was worthwhile making it easier to follow than the original.
    matthiaskrgr authored Jan 19, 2022
    Configuration menu
    Copy the full SHA
    fe93f08 View commit details
    Browse the repository at this point in the history
  24. Rollup merge of rust-lang#93077 - lcnr:write_substs, r=oli-obk

    remove `List::is_noop`
    
    think that `is_noop` is actually less clear than just using `is_empty`
    matthiaskrgr authored Jan 19, 2022
    Configuration menu
    Copy the full SHA
    43d508b View commit details
    Browse the repository at this point in the history