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 8 pull requests #121320

Closed
wants to merge 17 commits into from
Closed

Commits on Feb 16, 2024

  1. Merge CompilerError::CompilationFailed and CompilerError::ICE.

    `CompilerError` has `CompilationFailed` and `ICE` variants, which seems
    reasonable at first. But the way it identifies them is flawed:
    - If compilation errors out, i.e. `RunCompiler::run` returns an `Err`,
      it uses `CompilationFailed`, which is reasonable.
    - If compilation panics with `FatalError`, it catches the panic and uses
      `ICE`. This is sometimes right, because ICEs do cause `FatalError`
      panics, but sometimes wrong, because certain compiler errors also
      cause `FatalError` panics. (The compiler/rustdoc/clippy/whatever just
      catches the `FatalError` with `catch_with_exit_code` in `main`.)
    
    In other words, certain non-ICE compilation failures get miscategorized
    as ICEs. It's not possible to reliably distinguish the two cases, so
    this commit merges them. It also renames the combined variant as just
    `Failed`, to better match the existing `Interrupted` and `Skipped`
    variants.
    
    Here is an example of a non-ICE failure that causes a `FatalError`
    panic, from `tests/ui/recursion_limit/issue-105700.rs`:
    ```
     #![recursion_limit="4"]
     #![invalid_attribute]
     #![invalid_attribute]
     #![invalid_attribute]
     #![invalid_attribute]
     #![invalid_attribute]
     //~^ERROR recursion limit reached while expanding
    
     fn main() {{}}
    ```
    nnethercote committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    e72e7e9 View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2024

  1. Configuration menu
    Copy the full SHA
    488ffaa View commit details
    Browse the repository at this point in the history
  2. Move the extra directives for Mode::CoverageRun into iter_header

    When these extra directives were ported over as part of rust-lang#112300, it made sense
    to introduce `iter_header_extra` and pass them in as an extra argument.
    
    But now that rust-lang#120881 has added a `mode` parameter to `iter_header` for its own
    purposes, it's slightly simpler to move the coverage special-case code directly
    into `iter_header` as well. This lets us get rid of `iter_header_extra`.
    Zalathar committed Feb 17, 2024
    Configuration menu
    Copy the full SHA
    c521d7f View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2024

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

Commits on Feb 19, 2024

  1. Drive-by DUMMY_SP -> Span and fmt changes

    Noticed these while doing something else. There's no practical change, but it's preferable to use `DUMMY_SP` as little as possible, particularly when we have perfectlly useful `Span`s available.
    estebank committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    b4a424f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ac1754b View commit details
    Browse the repository at this point in the history
  3. Make is_nonoverlapping #[inline]

    It showed up with 3% execution time in a compiler profile.
    Noratrieb committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    0b59748 View commit details
    Browse the repository at this point in the history
  4. Separate testing and production sanitizers

    Oli Iliffe authored and ehuss committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    3e5ad42 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    41fddb5 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2024

  1. Rollup merge of rust-lang#120718 - saethlin:reasonable-fast-math, r=n…

    …nethercote
    
    Add "algebraic" fast-math intrinsics, based on fast-math ops that cannot return poison
    
    Setting all of LLVM's fast-math flags makes our fast-math intrinsics very dangerous, because some inputs are UB. This set of flags permits common algebraic transformations, but according to the [LangRef](https://llvm.org/docs/LangRef.html#fastmath), only the flags `nnan` (no nans) and `ninf` (no infs) can produce poison.
    
    And this uses the algebraic float ops to fix rust-lang#120720
    
    cc `@orlp`
    saethlin authored Feb 20, 2024
    Configuration menu
    Copy the full SHA
    5692324 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#121195 - D0liphin:master, r=ehuss

    unstable-book: Separate testing and production sanitizers
    
    This is a redo of [this PR](rust-lang#108942). Left the commit as before (except for reflowing to 80-width), since it already got approved.
    saethlin authored Feb 20, 2024
    Configuration menu
    Copy the full SHA
    bbe1fad View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#121205 - nnethercote:fix-stable-mir-Compile…

    …rError, r=oli-obk
    
    Merge `CompilerError::CompilationFailed` and `CompilerError::ICE`.
    
    `CompilerError` has `CompilationFailed` and `ICE` variants, which seems reasonable at first. But the way it identifies them is flawed:
    - If compilation errors out, i.e. `RunCompiler::run` returns an `Err`, it uses `CompilationFailed`, which is reasonable.
    - If compilation panics with `FatalError`, it catches the panic and uses `ICE`. This is sometimes right, because ICEs do cause `FatalError` panics, but sometimes wrong, because certain compiler errors also cause `FatalError` panics. (The compiler/rustdoc/clippy/whatever just catches the `FatalError` with `catch_with_exit_code` in `main`.)
    
    In other words, certain non-ICE compilation failures get miscategorized as ICEs. It's not possible to reliably distinguish the two cases, so this commit merges them. It also renames the combined variant as just `Failed`, to better match the existing `Interrupted` and `Skipped` variants.
    
    Here is an example of a non-ICE failure that causes a `FatalError` panic, from `tests/ui/recursion_limit/issue-105700.rs`:
    ```
     #![recursion_limit="4"]
     #![invalid_attribute]
     #![invalid_attribute]
     #![invalid_attribute]
     #![invalid_attribute]
     #![invalid_attribute]
     //~^ERROR recursion limit reached while expanding
    
     fn main() {{}}
    ```
    
    r? `@spastorino`
    saethlin authored Feb 20, 2024
    Configuration menu
    Copy the full SHA
    5acf646 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#121233 - Zalathar:extra-directives, r=oli-obk

    Move the extra directives for `Mode::CoverageRun` into `iter_header`
    
    When these extra directives were ported over as part of rust-lang#112300, it made sense to introduce `iter_header_extra` and pass them in as an extra argument.
    
    But now that rust-lang#120881 has added a `mode` parameter to `iter_header` for its own purposes, it's slightly simpler to move the coverage special-case code directly into `iter_header` as well. This lets us get rid of `iter_header_extra`.
    saethlin authored Feb 20, 2024
    Configuration menu
    Copy the full SHA
    5c14f75 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#121256 - Jarcho:visitor2, r=oli-obk

    Allow AST and HIR visitors to return `ControlFlow`
    
    Alternative to rust-lang#108598.
    
    Since rust-lang/libs-team#187 was rejected, this implements our own version of the `Try` trait (`VisitorResult`) and the `try` macro (`try_visit`). Since this change still allows visitors to return `()`, no changes have been made to the existing ones. They can be done in a separate PR.
    saethlin authored Feb 20, 2024
    Configuration menu
    Copy the full SHA
    ef2b714 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#121307 - estebank:drive-by, r=compiler-errors

    Drive-by `DUMMY_SP` -> `Span` and fmt changes
    
    Noticed these while doing something else. There's no practical change, but it's preferable to use `DUMMY_SP` as little as possible, particularly when we have perfectlly useful `Span`s available.
    saethlin authored Feb 20, 2024
    Configuration menu
    Copy the full SHA
    8fe828e View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#121310 - GrigorenkoPV:doc-smallfix, r=Nilst…

    …rieb
    
    Remove an old hack for rustdoc
    
    Since rust-lang#78696 has been resolved
    saethlin authored Feb 20, 2024
    Configuration menu
    Copy the full SHA
    e6060eb View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#121311 - Nilstrieb:is-it-overlapping, r=sae…

    …thlin
    
    Make `is_nonoverlapping` `#[inline]`
    
    It showed up with 3% execution time in a compiler profile.
    
    backlink to rust-lang#120848
    
    r? `@saethlin`
    saethlin authored Feb 20, 2024
    Configuration menu
    Copy the full SHA
    6544ba2 View commit details
    Browse the repository at this point in the history