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 13 pull requests #120743

Closed
wants to merge 42 commits into from
Closed

Commits on Jan 16, 2024

  1. Add unstable -Z direct-access-external-data cmdline flag for rustc

    The new flag has been described in the Major Change Proposal at
    rust-lang/compiler-team#707
    heiher committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    06a4168 View commit details
    Browse the repository at this point in the history

Commits on Jan 28, 2024

  1. Configuration menu
    Copy the full SHA
    f38489e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d1edc9d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1031598 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2024

  1. Configuration menu
    Copy the full SHA
    7a2b663 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b6d0225 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a73c448 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a57a00e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5d46b98 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2024

  1. coverage: Split out counter increment sites from BCB node/edge counters

    This makes it possible for two nodes/edges in the coverage graph to share the
    same counter, without causing the instrumentor to inject unwanted duplicate
    counter-increment statements.
    Zalathar committed Feb 1, 2024
    Configuration menu
    Copy the full SHA
    2e212b7 View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2024

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

Commits on Feb 5, 2024

  1. Configuration menu
    Copy the full SHA
    d622195 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9aff42e View commit details
    Browse the repository at this point in the history
  3. Clarify order of operations during interning

    Co-authored-by: Ralf Jung <post@ralfj.de>
    oli-obk and RalfJung authored Feb 5, 2024
    Configuration menu
    Copy the full SHA
    c94769a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    411967c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6cac1c4 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2024

  1. Suggest turnging if let into irrefutable let if appropriate

    When encountering an `if let` tail expression without an `else` arm for an
    enum with a single variant, suggest writing an irrefutable `let` binding
    instead.
    
    ```
    error[E0317]: `if` may be missing an `else` clause
      --> $DIR/irrefutable-if-let-without-else.rs:8:5
       |
    LL |   fn foo(x: Enum) -> i32 {
       |                      --- expected `i32` because of this return type
    LL | /     if let Enum::Variant(value) = x {
    LL | |         value
    LL | |     }
       | |_____^ expected `i32`, found `()`
       |
       = note: `if` expressions without `else` evaluate to `()`
       = help: consider adding an `else` block that evaluates to the expected type
    help: consider using an irrefutable `let` binding instead
       |
    LL ~     let Enum::Variant(value) = x;
    LL ~         value
       |
    ```
    
    Fix rust-lang#61788.
    estebank committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    a939bad View commit details
    Browse the repository at this point in the history
  2. Mark "unused binding" suggestion as maybe incorrect

    Ignoring unused bindings should be a determination made by a human, `rustfix` shouldn't auto-apply the suggested change.
    
    Fix rust-lang#54196.
    estebank committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    aef18c9 View commit details
    Browse the repository at this point in the history
  3. Remove return value from emit_stashed_diagnostics.

    It's never used.
    nnethercote committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    8d1c20a View commit details
    Browse the repository at this point in the history
  4. fix llvm_out to use the correct LLVM root

    When `download-ci-llvm` is enabled, `llvm_out` ends up with the
    error below due to an incorrect path on cross-compilations. This change fixes that.
    
    ```
    failed to execute command: "/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config" "--version"
    ERROR: No such file or directory (os error 2)
    ```
    
    Signed-off-by: onur-ozkan <work@onurozkan.dev>
    onur-ozkan committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    7fb4512 View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2024

  1. Configuration menu
    Copy the full SHA
    14dda5f View commit details
    Browse the repository at this point in the history
  2. test llvm_out behaviour

    Signed-off-by: onur-ozkan <work@onurozkan.dev>
    onur-ozkan committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    63cc3c7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a59d006 View commit details
    Browse the repository at this point in the history
  4. Remove an unchecked_claim_error_was_emitted call.

    When `catch_fatal_errors` catches a `FatalErrorMarker`, it returns an
    `ErrorGuaranteed` that is conjured out of thin air with
    `unchecked_claim_error_was_emitted`. But that `ErrorGuaranteed` is never
    used.
    
    This commit changes it to instead conjure a `FatalError` out of thin
    air. (A non-deprecated action!) This makes more sense because
    `FatalError` and `FatalErrorMarker` are a natural pairing -- a
    `FatalErrorMarker` is created by calling `FatalError::raise`, so this is
    effectively getting back the original `FatalError`.
    
    This requires a tiny change in `catch_with_exit_code`. The old result of
    the `catch_fatal_errors` call there was
    `Result<Result<(), ErrorGuaranteed>, ErrorGuaranteed>` which could be
    `flatten`ed into `Result<(), ErrorGuaranteed>`. The new result of the
    `catch_fatal_errors` calls is
    `Result<Result<(), ErrorGuaranteed>, FatalError>`, which can't be
    `flatten`ed but is still easily matched for the success case.
    nnethercote committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    e55df62 View commit details
    Browse the repository at this point in the history
  5. rustdoc: make main more like rustc's.

    By making non-unicode arguments a fatal error instead of a warning, we
    don't need to handle what comes after, which avoids the need for an
    `unchecked_claim_error_was_emitted` call.
    nnethercote committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    e6794dd View commit details
    Browse the repository at this point in the history
  6. rustdoc: remove unchecked_claim_error_was_emitted call in main_args.

    `main_args` calls `from_matches`, which does lots of initialization. If
    anything goes wrong, `from_matches` emits an error message and returns
    `Err(1)` (or `Err(3)`). `main_args` then turns the `Err(1)` into
    `Err(ErrorGuaranteed)`, because that's what `catch_with_exit_code`
    requires on error. But `catch_with_exit_code` doesn't do anything with
    the `ErrorGuaranteed`, it just exits with `EXIT_FAILURE`.
    
    We can avoid the creation of the `ErrorGuaranteed` (which requires
    an undesirable `unchecked_claim_error_was_emitted` call), by changing
    `from_matches` to instead eagerly abort if anything goes wrong. The
    behaviour from the user's point of view is the same: an early abort with
    an `EXIT_FAILURE` exit code.
    
    And we can also simplify `from_matches` to return an `Option` instead of
    a `Result`:
    - Old `Err(0)` case --> `None`
    - Old `Err(_)` case --> fatal error.
    
    This requires similar changes to `ScrapeExamplesOptions::new` and
    `load_call_locations`.
    nnethercote committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    83adf88 View commit details
    Browse the repository at this point in the history
  7. Tighten up ErrorGuaranteed handling.

    - In `emit_producing_error_guaranteed`, only allow `Level::Error`.
    - In `emit_diagnostic`, only produce `ErrorGuaranteed` for `Level` and
      `DelayedBug`. (Not `Bug` or `Fatal`. They don't need it, because the
      relevant `emit` methods abort.)
    - Add/update various comments.
    nnethercote committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    97c157f View commit details
    Browse the repository at this point in the history
  8. Rename unchecked_claim_error_was_emitted as `unchecked_error_guaran…

    …teed`.
    
    It's more to-the-point.
    nnethercote committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    6889fe3 View commit details
    Browse the repository at this point in the history
  9. MirPass: make name more const

    klensy committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    c5e6df0 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#110482 - chrisnc:armv8r-target, r=wesleywiser

    Add armv8r-none-eabihf target for the Cortex-R52.
    Nadrieril authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    2b6f393 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#119162 - heiher:direct-access-external-data…

    …, r=petrochenkov
    
    Add unstable `-Z direct-access-external-data` cmdline flag for `rustc`
    
    The new flag has been described in the Major Change Proposal at rust-lang/compiler-team#707
    
    Fixes rust-lang#118053
    Nadrieril authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    2e7e637 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#120302 - oli-obk:const_intern_cleanups, r=R…

    …alfJung
    
    various const interning cleanups
    
    After rust-lang#119044 I noticed that some things can be simplified and refactored.
    
    This is also a requirement for rust-lang#116564 as there we'll need to treat the base allocation differently from the others
    
    r? ```@RalfJung```
    Nadrieril authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    c541dc4 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#120455 - JarlEvanson:sroa-miri-tests, r=cjg…

    …illot
    
     Add FileCheck annotations to MIR-opt SROA tests
    
    Part of rust-lang#116971, adds FileCheck annotations to SROA MIR-opt tests in `tests/mir-opt/sroa` and a few uncategorized files.
    
    r? cjgillot
    Nadrieril authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    5661a5b View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#120470 - estebank:issue-54196, r=compiler-e…

    …rrors
    
    Mark "unused binding" suggestion as maybe incorrect
    
    Ignoring unused bindings should be a determination made by a human, `rustfix` shouldn't auto-apply the suggested change.
    
    Fix rust-lang#54196.
    Nadrieril authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    faa8be0 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#120479 - estebank:issue-61788, r=wesleywiser

    Suggest turning `if let` into irrefutable `let` if appropriate
    
    When encountering an `if let` tail expression without an `else` arm for an enum with a single variant, suggest writing an irrefutable `let` binding instead.
    
    ```
    error[E0317]: `if` may be missing an `else` clause
      --> $DIR/irrefutable-if-let-without-else.rs:8:5
       |
    LL |   fn foo(x: Enum) -> i32 {
       |                      --- expected `i32` because of this return type
    LL | /     if let Enum::Variant(value) = x {
    LL | |         value
    LL | |     }
       | |_____^ expected `i32`, found `()`
       |
       = note: `if` expressions without `else` evaluate to `()`
       = help: consider adding an `else` block that evaluates to the expected type
    help: consider using an irrefutable `let` binding instead
       |
    LL ~     let Enum::Variant(value) = x;
    LL ~         value
       |
    ```
    
    Fix rust-lang#61788.
    Nadrieril authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    0aefc20 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#120564 - Zalathar:increment-site, r=oli-obk

    coverage: Split out counter increment sites from BCB node/edge counters
    
    This makes it possible for two nodes/edges in the coverage graph to share the same counter, without causing the instrumentor to inject unwanted duplicate counter-increment statements.
    
    ---
    
    ```@rustbot``` label +A-code-coverage
    Nadrieril authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    57caa20 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#120633 - Nadrieril:place_info, r=compiler-e…

    …rrors
    
    pattern_analysis: gather up place-relevant info
    
    We track 3 things about each place during exhaustiveness: its type, its (data) validity, and whether it's the scrutinee place. This PR gathers all three into a single struct.
    
    r? ````@compiler-errors````
    Nadrieril authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    6edc4d7 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#120664 - SparrowLii:parallel_test, r=nnethe…

    …rcote
    
    Add parallel rustc ui tests
    
    Updates rust-lang#118698
    
    Add some ui tests for parallel rustc front end
    
    This is a relatively large feature so I think it's worth creating a new entity in tests/ui folder, so we need to modify the limit in tidy.
    Nadrieril authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    8ba999e View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#120721 - onur-ozkan:incorrect-llvm-path-on-…

    …cross-target, r=albertlarsan68
    
    fix `llvm_out` to use the correct LLVM root
    
    When `download-ci-llvm` is enabled, `llvm_out` ends up with the
    error below due to an incorrect path on cross-compilations. This change fixes that.
    
    ```sh
    failed to execute command: "/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config" "--version"
    ERROR: No such file or directory (os error 2)
    ```
    Nadrieril authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    0d3ff16 View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#120726 - saethlin:no-bashism, r=Mark-Simula…

    …crum
    
    Don't use bashism in checktools.sh
    
    `if [[` doesn't work because this is a `/bin/sh` script. We were never running the success side of this `if` at all.
    Nadrieril authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    ce49414 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#120733 - klensy:trait-const-fn, r=oli-obk

    MirPass: make name more const
    
    Continues rust-lang#120161, this time applied to `MirPass` instead of `MirLint`, locally shaves few (very few) instructions off.
    
    r? `@cjgillot`
    Nadrieril authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    4a110f2 View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#120735 - nnethercote:rm-some-unchecked_clai…

    …ms, r=oli-obk
    
    Remove some `unchecked_claim_error_was_emitted` calls
    
    We want to drive the number of these calls down as much as possible. This PR gets rid of a bunch of them.
    
    r? `@oli-obk`
    Nadrieril authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    600d3bb View commit details
    Browse the repository at this point in the history