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 #82443

Merged
merged 37 commits into from
Feb 23, 2021
Merged

Rollup of 10 pull requests #82443

merged 37 commits into from
Feb 23, 2021

Commits on Feb 8, 2021

  1. Configuration menu
    Copy the full SHA
    b2eed3a View commit details
    Browse the repository at this point in the history
  2. Add tests

    sledgehammervampire committed Feb 8, 2021
    Configuration menu
    Copy the full SHA
    8412da6 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2021

  1. Configuration menu
    Copy the full SHA
    ef778e7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1abc1e2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a428ab1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9f97a0b View commit details
    Browse the repository at this point in the history
  5. Suggest correct replacement for panic![123].

    Before this change, the suggestion was `std::panic::panic_any(123]`,
    changing the opening brace but not the closing one.
    m-ou-se committed Feb 14, 2021
    Configuration menu
    Copy the full SHA
    37c532c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8ad12bb View commit details
    Browse the repository at this point in the history
  7. Formatting.

    m-ou-se committed Feb 14, 2021
    Configuration menu
    Copy the full SHA
    2a0c424 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    daa371d View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2021

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

Commits on Feb 18, 2021

  1. Implement -Z hir-stats for nested foreign items

    An attempt to compute HIR stats for crates with nested foreign items results in an ICE.
    
    ```
    fn main() {
        extern "C" { fn f(); }
    }
    ```
    
    ```
    thread 'rustc' panicked at 'visit_nested_xxx must be manually implemented in this visitor'
    ```
    
    Provide required implementation of visitor method.
    tmiasko committed Feb 18, 2021
    Configuration menu
    Copy the full SHA
    bf09e04 View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2021

  1. Consider auto derefs before warning about write only fields

    Changes from 81473 extended the dead code lint with an ability to detect
    fields that are written to but never read from. The implementation skips
    over fields on the left hand side of an assignment, without marking them
    as live.
    
    A field access might involve an automatic dereference and de-facto read
    the field. Conservatively mark expressions with deref adjustments as
    live to avoid generating false positive warnings.
    tmiasko committed Feb 19, 2021
    Configuration menu
    Copy the full SHA
    343b673 View commit details
    Browse the repository at this point in the history
  2. Add deref definition location

    Update conflict_errors.rs
    
    Add deref definition location
    sledgehammervampire committed Feb 19, 2021
    Configuration menu
    Copy the full SHA
    99f4573 View commit details
    Browse the repository at this point in the history
  3. Support pub on macro_rules

    petrochenkov authored and spastorino committed Feb 19, 2021
    Configuration menu
    Copy the full SHA
    0fddc2f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b3000ec View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2021

  1. Add @is command to jsondocck

    aDotInTheVoid committed Feb 20, 2021
    Configuration menu
    Copy the full SHA
    a00eb7e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f0637e4 View commit details
    Browse the repository at this point in the history
  3. Implement @set

    aDotInTheVoid committed Feb 20, 2021
    Configuration menu
    Copy the full SHA
    cd5f603 View commit details
    Browse the repository at this point in the history
  4. Implement using @set values

    aDotInTheVoid committed Feb 20, 2021
    Configuration menu
    Copy the full SHA
    dd4b938 View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2021

  1. Apply suggestions from code review

    Co-authored-by: Joshua Nelson <joshua@yottadb.com>
    aDotInTheVoid and Joshua Nelson authored Feb 21, 2021
    Configuration menu
    Copy the full SHA
    a22d948 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ba22a69 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2021

  1. Configuration menu
    Copy the full SHA
    1847a6c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dd9ab16 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4c949a4 View commit details
    Browse the repository at this point in the history
  4. Fix mir-cfg dumps

    Fixes rust-lang#81918
    Fixes rust-lang#82326 (duplicate)
    Fixes rust-lang#82325
    osa1 committed Feb 22, 2021
    Configuration menu
    Copy the full SHA
    2145a87 View commit details
    Browse the repository at this point in the history
  5. Remove many RefCells from DocContext

    I left some of them so this change doesn't balloon in size and because
    removing the RefCell in `DocContext.resolver` would require compiler
    changes.
    
    Thanks to `@jyn514` for making this a lot easier with rust-lang#82020!
    camelid committed Feb 22, 2021
    Configuration menu
    Copy the full SHA
    e4ac499 View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2021

  1. Rollup merge of rust-lang#81629 - 1000teslas:issue-81365-fix, r=Aaron…

    …1011
    
    Point out implicit deref coercions in borrow
    
    Fixes rust-lang#81365
    
    `@Aaron1011` I'm not sure why my code shows the note even in an implicit `Deref` call. See the output for `issue-81365-8.rs`.
    Dylan-DPC authored Feb 23, 2021
    Configuration menu
    Copy the full SHA
    18d1284 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#82113 - m-ou-se:panic-format-lint, r=estebank

    Improve non_fmt_panic lint.
    
    This change:
    - fixes the span used by this lint in the case the panic argument is a single macro expansion (e.g. `panic!(a!())`);
    - adds a suggestion for `panic!(format!(..))` to remove `format!()` instead of adding `"{}", ` or using `panic_any` like it does now; and
    - fixes the incorrect suggestion to replace `panic![123]` by `panic_any(123]`.
    
    Fixes rust-lang#82109.
    Fixes rust-lang#82110.
    Fixes rust-lang#82111.
    
    Example output:
    ```
    warning: panic message is not a string literal
     --> src/main.rs:8:12
      |
    8 |     panic!(format!("error: {}", "oh no"));
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |
      = note: `#[warn(non_fmt_panic)]` on by default
      = note: this is no longer accepted in Rust 2021
      = note: the panic!() macro supports formatting, so there's no need for the format!() macro here
    help: remove the `format!(..)` macro call
      |
    8 |     panic!("error: {}", "oh no");
      |           --                  --
    
    ```
    
    r? `@estebank`
    Dylan-DPC authored Feb 23, 2021
    Configuration menu
    Copy the full SHA
    547b3ad View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#82258 - tmiasko:foreign-hir-stats, r=davidtwco

    Implement -Z hir-stats for nested foreign items
    
    An attempt to compute HIR stats for crates with nested foreign items results in an ICE.
    
    ```rust
    fn main() {
        extern "C" { fn f(); }
    }
    ```
    
    ```
    thread 'rustc' panicked at 'visit_nested_xxx must be manually implemented in this visitor'
    ```
    
    Provide required implementation of visitor method.
    Dylan-DPC authored Feb 23, 2021
    Configuration menu
    Copy the full SHA
    2982ba5 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#82296 - spastorino:pubrules, r=nikomatsakis

    Support `pub` on `macro_rules`
    
    This rebases and updates `since` version of rust-lang#78166 from ``@petrochenkov``
    
    r? ``@nikomatsakis``
    Dylan-DPC authored Feb 23, 2021
    Configuration menu
    Copy the full SHA
    e2561c5 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#82297 - tmiasko:write-only, r=oli-obk

    Consider auto derefs before warning about write only fields
    
    Changes from rust-lang#81473 extended the dead code lint with an ability to detect
    fields that are written to but never read from. The implementation skips
    over fields on the left hand side of an assignment, without marking them
    as live.
    
    A field access might involve an automatic dereference and de-facto read
    the field. Conservatively mark expressions with deref adjustments as
    live to avoid generating false positive warnings.
    
    Closes rust-lang#81626.
    Dylan-DPC authored Feb 23, 2021
    Configuration menu
    Copy the full SHA
    9d378b3 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#82305 - camelid:no-more-refcell, r=jyn514

    Remove many RefCells from DocContext
    
    I left some of them so this change doesn't balloon in size and because
    removing the RefCell in `DocContext.resolver` would require compiler
    changes.
    
    Thanks to `@jyn514` for making this a lot easier with rust-lang#82020!
    
    r? `@jyn514`
    Dylan-DPC authored Feb 23, 2021
    Configuration menu
    Copy the full SHA
    8e67fe5 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#82308 - estebank:issue-82290, r=lcnr

    Lower condition of `if` expression before it's "then" block
    
    Fix rust-lang#82290, fix rust-lang#82250.
    Dylan-DPC authored Feb 23, 2021
    Configuration menu
    Copy the full SHA
    269f399 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#82311 - aDotInTheVoid:jsondocck-improvement…

    …s, r=jyn514
    
    Jsondocck improvements
    
    Adds 2 new commands, ```@is``` and ```@set`.``
    
    ```@is``` works like ```@has`,`` except instead of checking if any value matches, it checks that there is exactly one value, and it matches. This allows more precise testing.
    
    ```@set``` gets a value, and saves it to be used later. This makes it possible to check that an item appears in the correct module.
    
    Once this lands, the rest of the test suite can be upgraded to use these.
    
    cc ``@CraftSpider``
    
     ``@rustbot`` modify labels: +T-rustdoc +A-rustdoc-json +A-testsuite
    Dylan-DPC authored Feb 23, 2021
    Configuration menu
    Copy the full SHA
    619e47b View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#82362 - osa1:issue81918, r=oli-obk

    Fix mir-cfg dumps
    
    Fixes rust-lang#81918
    Fixes rust-lang#82326 (duplicate)
    Fixes rust-lang#82325
    
    ---
    
    r? ``@oli-obk``
    Dylan-DPC authored Feb 23, 2021
    Configuration menu
    Copy the full SHA
    aa1405f View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#82391 - RalfJung:miri-atomic-minmax, r=dtolnay

    disable atomic_max/min tests in Miri
    
    Disable some tests that currently [fail in Miri](https://travis-ci.com/github/RalfJung/miri-test-libstd/builds/217788631).
    Dylan-DPC authored Feb 23, 2021
    Configuration menu
    Copy the full SHA
    51511c7 View commit details
    Browse the repository at this point in the history