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 10 pull requests #73824

Closed
wants to merge 39 commits into from

Commits on May 28, 2020

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

Commits on Jun 11, 2020

  1. Configuration menu
    Copy the full SHA
    93cbad6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ec63f9d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c1243db View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2020

  1. Configuration menu
    Copy the full SHA
    b60cefe View commit details
    Browse the repository at this point in the history
  2. Restore some write_fmts

    Lucretiel committed Jun 17, 2020
    Configuration menu
    Copy the full SHA
    14d385b View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2020

  1. Configuration menu
    Copy the full SHA
    810f309 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    50d7dea View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    93e3552 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9576e30 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8200771 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    978470f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    91f73fb View commit details
    Browse the repository at this point in the history
  8. fix typo

    Co-authored-by: Bastian Kauschke <bastian_kauschke@hotmail.de>
    RalfJung and lcnr committed Jun 22, 2020
    Configuration menu
    Copy the full SHA
    7754322 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    7f8fe6a View commit details
    Browse the repository at this point in the history
  10. expand a comment

    RalfJung committed Jun 22, 2020
    Configuration menu
    Copy the full SHA
    5e5ae8b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    a593728 View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2020

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

Commits on Jun 25, 2020

  1. Adds a clearer message for when the async keyword is missing from a f…

    …unction
    
    Signed-off-by: Nell Shamrell <nellshamrell@gmail.com>
    nellshamrell committed Jun 25, 2020
    Configuration menu
    Copy the full SHA
    5e28eb5 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2020

  1. errors: use -Z terminal-width in JSON emitter

    This commit makes the JSON emitter use `-Z terminal-width` in the
    "rendered" field of the JSON output.
    
    Signed-off-by: David Wood <david@davidtw.co>
    davidtwco committed Jun 26, 2020
    Configuration menu
    Copy the full SHA
    3678e5c View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2020

  1. Configuration menu
    Copy the full SHA
    a4e7b47 View commit details
    Browse the repository at this point in the history
  2. more LocalDefId in ty::context

    lcnr committed Jun 27, 2020
    Configuration menu
    Copy the full SHA
    1875c79 View commit details
    Browse the repository at this point in the history
  3. more LocalDefId cleanup

    lcnr committed Jun 27, 2020
    Configuration menu
    Copy the full SHA
    2d280a5 View commit details
    Browse the repository at this point in the history
  4. fix typo in self-profile.md

    atetubou committed Jun 27, 2020
    Configuration menu
    Copy the full SHA
    9308860 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4c14f9d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d25d6c5 View commit details
    Browse the repository at this point in the history
  7. Serialize all foreign SourceFiles into proc-macro crate metadata

    Normally, we encode a `Span` that references a foreign `SourceFile` by
    encoding information about the foreign crate. When we decode this
    `Span`, we lookup the foreign crate in order to decode the `SourceFile`.
    
    However, this approach does not work for proc-macro crates. When we load
    a proc-macro crate, we do not deserialzie any of its dependencies (since
    a proc-macro crate can only export proc-macros). This means that we
    cannot serialize a reference to an upstream crate, since the associated
    metadata will not be available when we try to deserialize it.
    
    This commit modifies foreign span handling so that we treat all foreign
    `SourceFile`s as local `SourceFile`s when serializing a proc-macro.
    All `SourceFile`s will be stored into the metadata of a proc-macro
    crate, allowing us to cotinue to deserialize a proc-macro crate without
    needing to load any of its dependencies.
    
    Since the number of foreign `SourceFile`s that we load during a
    compilation session may be very large, we only serialize a `SourceFile`
    if we have also serialized a `Span` which requires it.
    Aaron1011 committed Jun 27, 2020
    Configuration menu
    Copy the full SHA
    2765149 View commit details
    Browse the repository at this point in the history
  8. Add links to fs::DirEntry::metadata

    `fs::DirEntry::metadata` doesn't traverse symlinks. It is not immediately
    clear what to do if you do want to traverse symlinks. This change adds
    links to the two other `metadata` functions that will follow symlinks.
    robyoung committed Jun 27, 2020
    Configuration menu
    Copy the full SHA
    0e0584f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    8e8c54a View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2020

  1. Rollup merge of rust-lang#72705 - Lucretiel:stdio-forwarding, r=Amanieu

    Added io forwarding methods to the stdio structs
    
    Added methods to forward the `io::Read` and `io::Write` methods of the myriad wrapper structs in `stdio.rs` to their underlying readers / writers. This is especially important for the structs on the outside of a locking boundary, to ensure that the lock isn't being dropped and re-acquired in a loop.
    Manishearth committed Jun 28, 2020
    Configuration menu
    Copy the full SHA
    9e4d353 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#72796 - RalfJung:mir-assign-sanity, r=matth…

    …ewjasper
    
    MIR sanity check: validate types on assignment
    
    This expands the MIR validation added by @jonas-schievink in rust-lang#72093 to also check that on an assignment, the types of both sides match.
    
    Cc @eddyb @oli-obk
    Manishearth committed Jun 28, 2020
    Configuration menu
    Copy the full SHA
    e0026eb View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#73243 - poliorcetics:discourage-is-file, r=…

    …Amanieu
    
    Add documentation to point to `File::open` or `OpenOptions::open` instead of `is_file` to check read/write possibility
    
    Fixes rust-lang#64170.
    
    This adds documentation to point user towards `!is_dir` instead of `is_file` when all they want to is read from a source.
    
    I ran `rg "fn is_file\("` to find all `is_file` methods, I hope I did not miss one.
    Manishearth committed Jun 28, 2020
    Configuration menu
    Copy the full SHA
    9f575a7 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#73672 - nellshamrell:async-fix, r=estebank

    Adds a clearer message for when the async keyword is missing from a f…
    
    …unction
    
    This is a somewhat simple fix for rust-lang#66731.
    
    Under the current version of Rust, if a user has a rust file that looks like this:
    
    ```rust
    fn boo (){}
    
    async fn foo() {
        boo().await;
    }
    
    fn main() {
    
    }
    ```
    
    And they attempt to run it, they will receive an error message that looks like this:
    
    ```bash
    error: incorrect use of `await`                                                                                                        --> test.rs:4:14                                                                                                                       |                                                                                                                                   4 |     boo.await();                                                                                                                    |              ^^ help: `await` is not a method call, remove the parentheses                                                                                                                                                                                              error[E0277]: the trait bound `fn() {boo}: std::future::Future` is not satisfied                                                        --> test.rs:4:5                                                                                                                        |                                                                                                                                  4  |     boo.await();                                                                                                                    |     ^^^^^^^^^ the trait `std::future::Future` is not implemented for `fn() {boo}`                                                                                                                                                                                      error: aborting due to 2 previous errors                                                                                                                                                                                                                                    For more information about this error, try `rustc --explain E0277`.
    ```
    
    This is not very clear.
    
    With the changes made in this PR, when a user compiles and runs that same rust code, they will receive an error message that looks like this:
    
    ```bash
    error[E0277]: `()` is not a future.
     --> test.rs:4:5
      |
    4 |     boo().await;
      |     ^^^^^^^^^^^ `()` is not a future
      |
      = help: the trait `std::future::Future` is not implemented for `()`
      = note: required by `std::future::Future::poll`
    ```
    
    In the future, I think we should make this error message even clearer, perhaps through a solution like the one described in [this comment](rust-lang#66731 (comment)). However, as that potentially involves a major change proposal, I would rather get this change in now and make the error message a little clearer while an MCP is drafted and discussed.
    
    Signed-off-by: Nell Shamrell <nellshamrell@gmail.com>
    Manishearth committed Jun 28, 2020
    Configuration menu
    Copy the full SHA
    efa06a7 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#73706 - Aaron1011:fix/proc-macro-foreign-sp…

    …an, r=petrochenkov
    
    Serialize all foreign `SourceFile`s into proc-macro crate metadata
    
    Normally, we encode a `Span` that references a foreign `SourceFile` by
    encoding information about the foreign crate. When we decode this
    `Span`, we lookup the foreign crate in order to decode the `SourceFile`.
    
    However, this approach does not work for proc-macro crates. When we load
    a proc-macro crate, we do not deserialzie any of its dependencies (since
    a proc-macro crate can only export proc-macros). This means that we
    cannot serialize a reference to an upstream crate, since the associated
    metadata will not be available when we try to deserialize it.
    
    This commit modifies foreign span handling so that we treat all foreign
    `SourceFile`s as local `SourceFile`s when serializing a proc-macro.
    All `SourceFile`s will be stored into the metadata of a proc-macro
    crate, allowing us to cotinue to deserialize a proc-macro crate without
    needing to load any of its dependencies.
    
    Since the number of foreign `SourceFile`s that we load during a
    compilation session may be very large, we only serialize a `SourceFile`
    if we have also serialized a `Span` which requires it.
    Manishearth committed Jun 28, 2020
    Configuration menu
    Copy the full SHA
    a481665 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#73763 - davidtwco:terminal-width-json-emitt…

    …er, r=estebank
    
    errors: use `-Z terminal-width` in JSON emitter
    
    This PR makes the JSON emitter use `-Z terminal-width` in the "rendered" field of the JSON output.
    
    r? @estebank
    Manishearth committed Jun 28, 2020
    Configuration menu
    Copy the full SHA
    0269560 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#73796 - lcnr:LocalDefId, r=matthewjasper

    replace more `DefId`s with `LocalDefId`
    
    part of rust-lang#70853
    Manishearth committed Jun 28, 2020
    Configuration menu
    Copy the full SHA
    8ea7283 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#73797 - atetubou:patch-1, r=jonas-schievink

    fix typo in self-profile.md
    Manishearth committed Jun 28, 2020
    Configuration menu
    Copy the full SHA
    2da0dcd View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#73800 - nikic:hash_i, r=kennytm

    Forward Hash::write_iN to Hash::write_uN
    
    The `Hasher::write_iN()` methods should forward to `Hasher::write_uN()`, because some Hasher implementations implement only the `write_uN()` variants, with the expectation that `write_iN()` will use the same implementation. Most notably, this is the case for the [FxHasher](https://github.com/rust-lang/rustc-hash/blob/5e09ea0a1c7ab7e4f9e27771f5a0e5a36c58d1bb/src/lib.rs#L111) used by rustc itself.
    
    This used to be the case previously, but was broken in rust-lang#59982. As the PR description makes no mention of this particular change, I assume it was unintentional.
    
    In a local test, this mitigates the regression from rust-lang#73526 on at least one test-case (cc @cuviper), because we're no longer at the mercy of `FxHasher::write()` getting inlined to get reasonable performance.
    Manishearth committed Jun 28, 2020
    Configuration menu
    Copy the full SHA
    2e7ac62 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#73809 - robyoung:docs/add-links-to-DirEntry…

    …-metadata, r=hanna-kruppe
    
    Add links to fs::DirEntry::metadata
    
    `fs::DirEntry::metadata` doesn't traverse symlinks. It is not immediately clear what to do if you do want to traverse symlinks. This change adds links to the two other `metadata` functions that will follow symlinks.
    Manishearth committed Jun 28, 2020
    Configuration menu
    Copy the full SHA
    0eb1ce0 View commit details
    Browse the repository at this point in the history