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

Closed
wants to merge 26 commits into from

Commits on Feb 1, 2024

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

Commits on Feb 2, 2024

  1. Configuration menu
    Copy the full SHA
    e1826bf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6b2a824 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c2a0d11 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2024

  1. std::thread::available_parallelism merging linux/android/freebsd version

    FreeBSD 13.1 had introduced a sched cpu affinity compatibility layer
    with Linux. 13.0 and even 13.1 being EOL, we can simplify here.
    devnexen committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    0bfcafd View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2024

  1. Invert diagnostic lints.

    That is, change `diagnostic_outside_of_impl` and
    `untranslatable_diagnostic` from `allow` to `deny`, because more than
    half of the compiler has be converted to use translated diagnostics.
    
    This commit removes more `deny` attributes than it adds `allow`
    attributes, which proves that this change is warranted.
    nnethercote committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    0ac1195 View commit details
    Browse the repository at this point in the history
  2. A drive-by rewrite of give_region_a_name()

    This rewrite makes the cache-updating nature of the function slightly clearer, using the Entry API into the hash table for region names to capture the update-insert nature of the method. May be marginally more efficient since it only runtime-borrows the map once, but in this context the performance impact is almost certainly completely negligible.
    amandasystems committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    ad3d04c View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2024

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

Commits on Feb 8, 2024

  1. Reorder the diagnostic API methods.

    The current order is almost perfectly random. This commit puts them into
    a predictable order in their own impl block, going from the highest
    level (`Block`) to the lowest (`Expect`). Within each level this is the
    order:
    
    - struct_err, err
    - struct_span_err, span_err
    - create_err, emit_err
    
    The first one in each pair creates a diagnostic, the second one creates
    *and* emits a diagnostic. Not every method is present for every level.
    
    The diff is messy, but other than moving methods around, the only thing
    it does is create the new `impl DiagCtxt` block with its own comment.
    nnethercote committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    0e4b55b View commit details
    Browse the repository at this point in the history
  2. Fix inconsistencies in the diagnostic API methods.

    - Remove low-value comments about functionality that is obvious.
    
    - Add missing `track_caller` attributes -- every method should have one.
    
    - Adjust `rustc_lint_diagnostic` attributes. Every method involving a
      `impl Into<DiagnosticMessage>` or `impl Into<SubdiangnosticMessage>`
      argument should have one, except for those producing bugs, which
      aren't user-facing.
    nnethercote committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    d1920a7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    795be51 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f676c3d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9224387 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    41f9b57 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    11bd2ea View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    5cb9e31 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#113026 - jieyouxu:run-make-v2, r=bjorn3

    Introduce `run-make` V2 infrastructure, a `run_make_support` library and port over 2 tests as example
    
    See [issue rust-lang#40713: Switch run-make tests from Makefiles to rust](rust-lang#40713) for more context.
    
    ### Basic Description of `run-make` V2
    
    `run-make` V2 aims to eliminate the dependency on `make` and `Makefile`s for building `run-make`-style tests. Makefiles are replaced by *recipes* (`rmake.rs`). The current implementation runs `run-make` V2 tests in 3 steps:
    
    1. We build the support library `run_make_support` which the `rmake.rs` recipes depend on as a tool dylib.
    2. We build the recipe `rmake.rs` and link in the support library.
    3. We run the recipe to build and run the tests.
    
    `rmake.rs` is basically a replacement for `Makefile`, and allows running arbitrary Rust code.
    
    ### Planned Changes
    
    - [x] Get rid of the builder style patterns in `rmake_support` and instead use something like
    
        ```rust
        let output = rustc!(scx, "--cfg x -Cprefer-dynamic -Csymbol-mangling-version=legacy -
        Zunstable-options");
        ```
        as per Nils' suggestion. This can probably use something like `xshell`.
    - [x] Make `run_make_support` into a proper crate so it can have external dependencies like `xshell`.
    - [x] Instead of having an entire alternative directory `run-make-v2`, change how V2 tests are collected based on presence of `rmake.rs` recipe file. This should ease migration and prevent git history from being messed up by big moves.
    
    ### Disclaimer
    
    The current implementation is very much a **very very rough prototype** just to get the 2 example tests working. I would appreciate any feedback on the design and implementation.
    matthiaskrgr authored Feb 8, 2024
    Configuration menu
    Copy the full SHA
    1ed4a2a View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#120589 - devnexen:cpuaff_fbsd_upd, r=m-ou-se

    std::thread::available_parallelism merging linux/android/freebsd version
    
    FreeBSD 13.1 had introduced a sched cpu affinity compatibility layer with Linux. 13.0 and even 13.1 being EOL, we can simplify here.
    matthiaskrgr authored Feb 8, 2024
    Configuration menu
    Copy the full SHA
    4f3d9e0 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#120590 - compiler-errors:dead, r=Nilstrieb

    Remove unused args from functions
    
    `#[instrument]` suppresses the unused arguments from a function, *and* suppresses unused methods too! This PR removes things which are only used via `#[instrument]` calls, and fixes some other errors (privacy?) that I will comment inline.
    
    It's possible that some of these arguments were being passed in for the purposes of being instrumented, but I am unconvinced by most of them.
    matthiaskrgr authored Feb 8, 2024
    Configuration menu
    Copy the full SHA
    0635247 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#120596 - GuillaumeGomez:jump-to-def-non-loc…

    …al-link, r=notriddle
    
    [rustdoc] Correctly generate path for non-local items in source code pages
    
    While browsing some crates using the "jump to def" feature, I realized that a lot of items didn't have a link generated. The reason is because we only cache foreign items if they appear in the documented API. This means that for the others, we need to infer them.
    
    r? ````@notriddle````
    matthiaskrgr authored Feb 8, 2024
    Configuration menu
    Copy the full SHA
    a0fe83a View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#120693 - nnethercote:invert-diagnostic-lint…

    …s, r=davidtwco
    
    Invert diagnostic lints.
    
    That is, change `diagnostic_outside_of_impl` and `untranslatable_diagnostic` from `allow` to `deny`, because more than half of the compiler has been converted to use translated diagnostics.
    
    This commit removes more `deny` attributes than it adds `allow` attributes, which proves that this change is warranted.
    
    r? ````@davidtwco````
    matthiaskrgr authored Feb 8, 2024
    Configuration menu
    Copy the full SHA
    0f2a874 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#120704 - amandasystems:silly-region-name-re…

    …write, r=compiler-errors
    
    A drive-by rewrite of `give_region_a_name()`
    
    This drive-by rewrite makes the cache-updating nature of the method clearer, using the Entry API into the hash table for region names to capture the update-insert nature of the method. May be marginally more efficient since it only runtime-borrows and indexes the map once, but in this context the performance impact is almost certainly completely negligible.
    
    Note that this commit should preserve all externally visible behaviour. Notably, it preserves the debug logging:
    
    1. printing even in the case of a `None` for the new computed name, and
    2. only printing on new values, begin silent on reused values
    matthiaskrgr authored Feb 8, 2024
    Configuration menu
    Copy the full SHA
    6e9af02 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#120750 - compiler-errors:itctx-by-val, r=cj…

    …gillot
    
    No need to take `ImplTraitContext` by ref
    
    We used to mutate `ImplTraitContext`, so it used to be `&mut` mutable ref. Then I think it used to have non-`Copy` data in it, so we took it by `&` ref. Now, none of that remains, so just copy it around.
    matthiaskrgr authored Feb 8, 2024
    Configuration menu
    Copy the full SHA
    471ebfd View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#120765 - nnethercote:reorder-diag-API, r=co…

    …mpiler-errors
    
    Reorder diagnostics API
    
    The totally random ordering of diagnostic methods in `DiagCtxt` has been low-key driving me crazy for a while now.
    
    r? ````@compiler-errors````
    matthiaskrgr authored Feb 8, 2024
    Configuration menu
    Copy the full SHA
    c21c0fb View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#120772 - m-ou-se:review, r=Nilstrieb

    Remove myself from review rotation.
    
    I've been unable to keep up with reviews. :(
    
    Not sure if this helps much, considering there aren't many other libs reviewers on the rotation at the moment.
    
    Hopefully I can add myself back again Soon™ when I can commit more time to reviewing.
    matthiaskrgr authored Feb 8, 2024
    Configuration menu
    Copy the full SHA
    e0ebdf2 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#120783 - integer32llc:improve-release-notes…

    …, r=Mark-Simulacrum
    
    Add release note for new ambiguous_wide_pointer_comparisons lint
    
    I found out about this new lint in Rust because I had code allowing the Clippy lint. Clippy alerted me to the lint name change, and I went searching for the new lint's name in the release notes and was surprised there wasn't an item for it.
    matthiaskrgr authored Feb 8, 2024
    Configuration menu
    Copy the full SHA
    aace69f View commit details
    Browse the repository at this point in the history