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 5 pull requests #112095

Closed
wants to merge 14 commits into from
Closed

Commits on May 25, 2023

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

Commits on May 26, 2023

  1. Configuration menu
    Copy the full SHA
    7f8846a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a0612d9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7f99c7d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b84c190 View commit details
    Browse the repository at this point in the history

Commits on May 29, 2023

  1. Add a distinct OperandValue::ZeroSized variant for ZSTs

    These tend to have special handling in a bunch of places anyway, so the variant helps remember that.  And I think it's easier to grok than non-Scalar Aggregates sometimes being `Immediates` (like I got wrong and caused 109992).  As a minor bonus, it means we don't need to generate poison LLVM values for them to pass around in `OperandValue::Immediate`s.
    scottmcm committed May 29, 2023
    Configuration menu
    Copy the full SHA
    9495095 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f333932 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    17e3d1c View commit details
    Browse the repository at this point in the history

Commits on May 30, 2023

  1. Configuration menu
    Copy the full SHA
    000cd9b View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#107916 - reez12g:issue-107040, r=Amanieu

    fix comment on Allocator trait
    
    fixes rust-lang#107040
    Noratrieb committed May 30, 2023
    Configuration menu
    Copy the full SHA
    5da322f View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#111318 - scottmcm:operand-value-poison, r=c…

    …ompiler-errors
    
    Add a distinct `OperandValue::ZeroSized` variant for ZSTs
    
    These tend to have special handling in a bunch of places anyway, so the variant helps remember that.  And I think it's easier to grok than `Aggregate`s sometimes being `Immediates` (after all, I previously got that wrong and caused rust-lang#109992).  As a minor bonus, it means we don't need to generate poison LLVM values for ZSTs to pass around in `OperandValue::Immediate`s.
    
    Inspired by rust-lang#110021 (comment), so
    r? ``@compiler-errors``
    Noratrieb committed May 30, 2023
    Configuration menu
    Copy the full SHA
    ccffdd7 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#111543 - Urgau:uplift_invalid_utf8_in_unche…

    …cked, r=WaffleLapkin
    
    Uplift `clippy::invalid_utf8_in_unchecked` lint
    
    This PR aims at uplifting the `clippy::invalid_utf8_in_unchecked` lint into two lints.
    
    ## `invalid_from_utf8_unchecked`
    
    (deny-by-default)
    
    The `invalid_from_utf8_unchecked` lint checks for calls to `std::str::from_utf8_unchecked` and `std::str::from_utf8_unchecked_mut` with an invalid UTF-8 literal.
    
    ### Example
    
    ```rust
    unsafe {
        std::str::from_utf8_unchecked(b"cl\x82ippy");
    }
    ```
    
    ### Explanation
    
    Creating such a `str` would result in undefined behavior as per documentation for `std::str::from_utf8_unchecked` and `std::str::from_utf8_unchecked_mut`.
    
    ## `invalid_from_utf8`
    
    (warn-by-default)
    
    The `invalid_from_utf8` lint checks for calls to `std::str::from_utf8` and `std::str::from_utf8_mut` with an invalid UTF-8 literal.
    
    ### Example
    
    ```rust
    std::str::from_utf8(b"ru\x82st");
    ```
    
    ### Explanation
    
    Trying to create such a `str` would always return an error as per documentation for `std::str::from_utf8` and `std::str::from_utf8_mut`.
    
    -----
    
    Mostly followed the instructions for uplifting a clippy lint described here: rust-lang#99696 (review)
    
    ``@rustbot`` label: +I-lang-nominated
    r? compiler
    
    -----
    
    For Clippy:
    
    changelog: Moves: Uplifted `clippy::invalid_utf8_in_unchecked` into rustc
    Noratrieb committed May 30, 2023
    Configuration menu
    Copy the full SHA
    983148a View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#111769 - saethlin:ctfe-backtrace-ctrlc, r=R…

    …alfJung
    
    Print a backtrace in const eval if interrupted
    
    Demo:
    ```rust
    #![feature(const_eval_limit)]
    #![const_eval_limit = "0"]
    
    const OW: u64 = {
        let mut res: u64 = 0;
        let mut i = 0;
        while i < u64::MAX {
            res = res.wrapping_add(i);
            i += 1;
        }
        res
    };
    
    fn main() {
        println!("{}", OW);
    }
    ```
    ```
    ╭ ➜ ben@archlinux:~/rust
    ╰ ➤ rustc +stage1 spin.rs
    ^Cerror[E0080]: evaluation of constant value failed
     --> spin.rs:8:33
      |
    8 |         res = res.wrapping_add(i);
      |                                 ^ Compilation was interrupted
    
    note: erroneous constant used
      --> spin.rs:15:20
       |
    15 |     println!("{}", OW);
       |                    ^^
    
    note: erroneous constant used
      --> spin.rs:15:20
       |
    15 |     println!("{}", OW);
       |                    ^^
       |
       = note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
    
    error: aborting due to previous error
    
    For more information about this error, try `rustc --explain E0080`.
    ```
    Noratrieb committed May 30, 2023
    Configuration menu
    Copy the full SHA
    6661426 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#112064 - GuillaumeGomez:migrate-gui-test-co…

    …lor-9, r=notriddle
    
    Migrate GUI colors test to original CSS color format
    
    Follow-up of rust-lang#111459.
    
    The `browser-ui-test` update is a fix when converting the alpha value to hex format. More information [here](GuillaumeGomez/browser-UI-test#511).
    
    r? ``@notriddle``
    Noratrieb committed May 30, 2023
    Configuration menu
    Copy the full SHA
    ec6ef7a View commit details
    Browse the repository at this point in the history