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

Closed
wants to merge 28 commits into from
Closed

Commits on Sep 14, 2022

  1. jsondoclint: New Tool

    aDotInTheVoid committed Sep 14, 2022
    Configuration menu
    Copy the full SHA
    2506aa0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    404b60b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    478c471 View commit details
    Browse the repository at this point in the history
  4. errors: add emit_note/create_note

    Add `Noted` marker struct that implements `EmissionGuarantee` so that
    `emit_note` and `create_note` can be implemented for struct diagnostics.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed Sep 14, 2022
    Configuration menu
    Copy the full SHA
    c5b9cb4 View commit details
    Browse the repository at this point in the history
  5. errors: implement IntoDiagnosticArg for &T

    Implement `IntoDiagnosticArg` for `&'a T` when `T` implements
    `IntoDiagnosticArg` and `Clone`. Makes it easier to write diagnostic
    structs that borrow something which implements `IntoDiagnosticArg`.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed Sep 14, 2022
    Configuration menu
    Copy the full SHA
    8a2f9c3 View commit details
    Browse the repository at this point in the history
  6. session: impl IntoDiagnosticArg for CrateType

    Forward the `Display` implementation for `CrateType` to
    `IntoDiagnosticArg` so that it can be used in diagnostic structs.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed Sep 14, 2022
    Configuration menu
    Copy the full SHA
    ae51741 View commit details
    Browse the repository at this point in the history
  7. errors: impl IntoDiagnosticArg for TargetTriple

    Forward the `Display` implementation for `CrateType` to
    `IntoDiagnosticArg` so that it can be used in diagnostic structs.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed Sep 14, 2022
    Configuration menu
    Copy the full SHA
    7d7cd17 View commit details
    Browse the repository at this point in the history
  8. session: diagnostic migration lint on more fns

    Apply the diagnostic migration lint to more functions on `Session`.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed Sep 14, 2022
    Configuration menu
    Copy the full SHA
    677d4d0 View commit details
    Browse the repository at this point in the history
  9. incremental: migrate diagnostics

    Migrate the `rustc_incremental` crate's diagnostics to translatable
    diagnostic structs.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed Sep 14, 2022
    Configuration menu
    Copy the full SHA
    b058e41 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d7b9221 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    a7a4fe9 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    bb1911d View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    5f1bc6f View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    41d35a9 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    c98c7cb View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    5956b56 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    393792d View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    24c751b View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    6e21a28 View commit details
    Browse the repository at this point in the history
  20. jsondoclint: Fix TODO's

    aDotInTheVoid committed Sep 14, 2022
    Configuration menu
    Copy the full SHA
    f69a6c2 View commit details
    Browse the repository at this point in the history
  21. Improve handing of env vars during bootstrap process

    This CL modifies the handing of env vars during the bootstrap process in
    two ways:
    1. Replaces '-' characters with '_' characters in target names to
       increase compatibility with different shells
    2. Passes Stage0 snapshot compiler related env vars to early invocations
       of Cargo
    chriswailes committed Sep 14, 2022
    Configuration menu
    Copy the full SHA
    8df181d View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    4cdf264 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2022

  1. Rollup merge of rust-lang#100754 - davidtwco:translation-incremental,…

    … r=compiler-errors
    
    incremental: migrate diagnostics
    
    - Apply the diagnostic migration lints to more functions on `Session`, namely: `span_warn`, `span_warn_with_code`, `warn` `note_without_error`, `span_note_without_error`, `struct_note_without_error`.
    - Add impls of `IntoDiagnosticArg` for `std::io::Error`, `std::path::Path` and `std::path::PathBuf`.
    - Migrate the `rustc_incremental` crate's diagnostics to translatable diagnostic structs.
    
    r? `@compiler-errors`
    cc rust-lang#100717
    Dylan-DPC authored Sep 15, 2022
    Configuration menu
    Copy the full SHA
    11e35f0 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#101713 - Bryanskiy:AccessLevels, r=petroche…

    …nkov
    
    change AccessLevels representation
    
    Part of RFC (rust-lang#48054). This patch implements effective visibility table with basic methods and change AccessLevels table representation according to it.
    
    r? `@petrochenkov`
    Dylan-DPC authored Sep 15, 2022
    Configuration menu
    Copy the full SHA
    8b283b9 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#101783 - chriswailes:env-vars, r=jyn514

    Improve handing of env vars during bootstrap process
    
    This CL modifies the handing of env vars during the bootstrap process in two ways:
    1. Replaces '-' characters with '_' characters in target names to increase compatibility with different shells
    2. Passes Stage0 snapshot compiler related env vars to early invocations of Cargo
    Dylan-DPC authored Sep 15, 2022
    Configuration menu
    Copy the full SHA
    3e7f24d View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#101787 - compiler-errors:cache-rpitit, r=pe…

    …trochenkov
    
    cache `collect_trait_impl_trait_tys`
    
    Micro-optimization for RPITITs
    Dylan-DPC authored Sep 15, 2022
    Configuration menu
    Copy the full SHA
    0ab8474 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#101802 - chriss0612:const_fn_trait_ref_impl…

    …s, r=fee1-dead
    
    Constify impl Fn* &(mut) Fn*
    
    Tracking Issue: [101803](rust-lang#101803)
    
    Feature gate: `#![feature(const_fn_trait_ref_impls)]`
    
    This feature allows using references to Fn* Items as Fn* Items themself in a const context.
    Dylan-DPC authored Sep 15, 2022
    Configuration menu
    Copy the full SHA
    6e23b26 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#101809 - aDotInTheVoid:jsondoclint, r=Guill…

    …aumeGomez
    
    Replace `check_missing_items.py` with `jsondoclint`
    
    [zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/check_missing_items.2Epy.20Replacement.2E)
    
    check_missing_items.py was a python script that checked rustdoc json output to make sure all the Id's referenced existed in the JSON index. This PR replaces that with a rust binary (`jsondoclint`) that does the same thing.
    
    ### Motivation
    
    1. Easier to change when `rustdoc-json-types` changes, as `jsondoclint` uses the types directly.
    2. Better Errors:
        - Multiple Errors can be emited for a single crate
        - Errors can say where in JSON they occored
            ```
            2:2889:408 not in index or paths, but refered to at '.index."2:2888:104".inner.items[0]'
            2:2890:410 not in index or paths, but refered to at '.index."2:2888:104".inner.items[1]'
            ```
    3. Catches more bugs.
        - Because matches are exaustive, all posible variants considered for enums
        - All Id's checked
        - Has already found rust-lang#101770, rust-lang#101199 and rust-lang#100973
        - Id type is also checked, so the Id's in a structs fields can only be field items.
    4. Allows the possibility of running from `rustdoc::json`, which we should do in a crator run at some point.
    
    cc `@CraftSpider`
    
    r? `@GuillaumeGomez`
    Dylan-DPC authored Sep 15, 2022
    Configuration menu
    Copy the full SHA
    a581bb7 View commit details
    Browse the repository at this point in the history