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 9 pull requests #127133

Merged
merged 28 commits into from
Jun 30, 2024
Merged

Rollup of 9 pull requests #127133

merged 28 commits into from
Jun 30, 2024

Commits on Jun 21, 2024

  1. Configuration menu
    Copy the full SHA
    e9ea578 View commit details
    Browse the repository at this point in the history
  2. Remove PrintBackendInfo trait

    It is only implemented for a single type. Directly passing this type is
    simpler and avoids overhead from indirect calls.
    bjorn3 committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    7f44532 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    98e8601 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e32eb4c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    22b3243 View commit details
    Browse the repository at this point in the history
  6. Remove check_overflow method from MiscMethods

    It can be retrieved from the Session too.
    bjorn3 committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    aacdce3 View commit details
    Browse the repository at this point in the history
  7. Remove type_i1 and type_struct from cg_ssa

    They are not representable by Cranelift
    bjorn3 committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    887f57f View commit details
    Browse the repository at this point in the history
  8. Fix doc comment

    bjorn3 committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    84f45bb View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2024

  1. Improve error message in tidy

    Kobzol committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    8a87f02 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2024

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

Commits on Jun 29, 2024

  1. Configuration menu
    Copy the full SHA
    a62cbda View commit details
    Browse the repository at this point in the history
  2. Fix a error suggestion for E0121 when using placeholder _ as return t…

    …ypes on function signature.
    
    Recommit after refactoring based on comment:
    rust-lang#126017 (comment)
    
    But when changing return type's lifetime to `ReError` will affect the subsequent borrow check process and cause test11 in typeck_type_placeholder_item.rs to lost E0515 message.
    ```rust
    fn test11(x: &usize) -> &_ {
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
        &x //~ ERROR cannot return reference to function parameter(this E0515 msg will disappear)
    }
    
    ```
    surechen committed Jun 29, 2024
    Configuration menu
    Copy the full SHA
    50edb32 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4442fd7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9c0ce05 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8dc36c1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5dece2b View commit details
    Browse the repository at this point in the history
  7. Review changes

    Kobzol committed Jun 29, 2024
    Configuration menu
    Copy the full SHA
    f6f21a8 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6a2638e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    15d5dac View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#123237 - bjorn3:debuginfo_refactor, r=compi…

    …ler-errors
    
    Various rustc_codegen_ssa cleanups
    matthiaskrgr authored Jun 29, 2024
    Configuration menu
    Copy the full SHA
    5b90824 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#126960 - Kobzol:tidy-venv-message, r=tgross35

    Improve error message in tidy
    
    The old error message was wrong (there is no `venv` Python package on PyPi), and we did not specify the correct Python path in the error message.
    matthiaskrgr authored Jun 29, 2024
    Configuration menu
    Copy the full SHA
    6df6879 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#127002 - Kobzol:bootstrap-perf-tool, r=onur…

    …-ozkan
    
    Implement `x perf` as a separate tool
    
    Continues work from rust-lang#126318, adds a CLI for running `rustc-perf` profiling commands through a new `rustc-perf-wrapper` tool. The CLI is in a separate tool to enable experimentation outside of `bootstrap`.
    
    This is probably most of what we can do so far, I'll add support for benchmarking once `rustc-perf` gets a terminal output for comparing benchmark results.
    
    r? ``@onur-ozkan``
    matthiaskrgr authored Jun 29, 2024
    Configuration menu
    Copy the full SHA
    6d74ffd View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#127081 - Kobzol:lld-test, r=onur-ozkan

    Add a run-make test that LLD is not being used by default on the x64 beta/stable channel
    
    rust-lang#126701 showed that the handling of `lld` in bootstrap is currently not ideal. While it would be nice to refactor it eventually, we should also make sure that we have a test that checks that `lld` is not used (yet!) by default on the x64 Linux stable channel.
    
    CC ``@lqd``
    
    r? ``@onur-ozkan``
    matthiaskrgr authored Jun 29, 2024
    Configuration menu
    Copy the full SHA
    fafb2ea View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#127106 - spastorino:improve-unsafe-extern-b…

    …locks-diagnostics, r=compiler-errors
    
    Improve unsafe extern blocks diagnostics
    
    Closes rust-lang#126327
    
    For this code:
    
    ```rust
    extern {
        pub fn foo();
        pub safe fn bar();
    }
    ```
    
    We get ...
    
    ```
    error: items in unadorned `extern` blocks cannot have safety qualifiers
     --> test.rs:3:5
      |
    3 |     pub safe fn bar();
      |     ^^^^^^^^^^^^^^^^^^
      |
    help: add unsafe to this `extern` block
      |
    1 | unsafe extern {
      | ++++++
    
    error[E0658]: `unsafe extern {}` blocks and `safe` keyword are experimental
     --> test.rs:3:9
      |
    3 |     pub safe fn bar();
      |         ^^^^
      |
      = note: see issue rust-lang#123743 <rust-lang#123743> for more information
      = help: add `#![feature(unsafe_extern_blocks)]` to the crate attributes to enable
    
    error: aborting due to 2 previous errors
    
    For more information about this error, try `rustc --explain E0658`.
    ```
    
    And then making the extern block unsafe, we get ...
    
    ```
    error: extern block cannot be declared unsafe
     --> test.rs:1:1
      |
    1 | unsafe extern {
      | ^^^^^^
      |
      = note: see issue rust-lang#123743 <rust-lang#123743> for more information
      = help: add `#![feature(unsafe_extern_blocks)]` to the crate attributes to enable
    
    error: items in unadorned `extern` blocks cannot have safety qualifiers
     --> test.rs:3:5
      |
    3 |     pub safe fn bar();
      |     ^^^^^^^^^^^^^^^^^^
    
    error[E0658]: `unsafe extern {}` blocks and `safe` keyword are experimental
     --> test.rs:3:9
      |
    3 |     pub safe fn bar();
      |         ^^^^
      |
      = note: see issue rust-lang#123743 <rust-lang#123743> for more information
      = help: add `#![feature(unsafe_extern_blocks)]` to the crate attributes to enable
    
    error: aborting due to 3 previous errors
    
    For more information about this error, try `rustc --explain E0658`.
    ```
    
    r? ``@compiler-errors``
    matthiaskrgr authored Jun 29, 2024
    Configuration menu
    Copy the full SHA
    7715295 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#127110 - surechen:fix_125488_06, r=compiler…

    …-errors
    
    Fix a error suggestion for E0121 when using placeholder _ as return types on function signature.
    
    Recommit after refactoring based on comment:
    rust-lang#126017 (comment)
    
    But when changing return type's lifetime to `ReError` will affect the subsequent borrow check process and cause test11 in typeck_type_placeholder_item.rs to lost E0515 message.
    ```rust
    fn test11(x: &usize) -> &_ {
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
        &x //~ ERROR cannot return reference to function parameter(this E0515 msg will disappear)
    }
    ```
    
    fixes rust-lang#125488
    
    r? ``@pnkfelix``
    matthiaskrgr authored Jun 29, 2024
    Configuration menu
    Copy the full SHA
    80cf576 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#127114 - linyihai:issue-126863, r=Nadrieril

    fix: prefer `(*p).clone` to `p.clone` if the `p` is a raw pointer
    
    Fixes rust-lang#126863
    
    I wonder if there is a better way to solve the regression problem of this test case:
    `tests/ui/borrowck/issue-20801.rs`.
    It's okay to drop the dereference symbol in this scenario.
    
    But it's not correct in rust-lang#126863
    
    ```
    help: consider removing the dereference here
      |
    5 -         let inner: String = *p;
    5 +         let inner: String = p;
    ```
    
    I haven't found out how to tell if clone pointer is allowed, i.e. no type mismatch occurs
    matthiaskrgr authored Jun 29, 2024
    Configuration menu
    Copy the full SHA
    9879b46 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#127118 - surechen:fix_126789, r=jieyouxu

    Show `used attribute`'s kind for user when find it isn't applied to a `static` variable.
    
    For example :
    ```rust
    extern "C" {
        #[used] //~ ERROR attribute must be applied to a `static` variable
        static FOO: i32; // show the kind of this item to help user understand why the error is reported.
    }
    ```
    
    fixes rust-lang#126789
    matthiaskrgr authored Jun 29, 2024
    Configuration menu
    Copy the full SHA
    5ea1a03 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#127122 - TDecking:div_ceil, r=Nilstrieb

    Remove uneccessary condition in `div_ceil`
    
    Previously, `div_ceil` for unsigned integers had a `rhs > 0` for rounding. That condition however is always fulfilled, since `rhs == 0` would mean a division by zero earlier.
    matthiaskrgr authored Jun 29, 2024
    Configuration menu
    Copy the full SHA
    c79e08d View commit details
    Browse the repository at this point in the history