Skip to content

Rollup of 17 pull requests#157541

Closed
JonathanBrouwer wants to merge 341 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-Kf94s03
Closed

Rollup of 17 pull requests#157541
JonathanBrouwer wants to merge 341 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-Kf94s03

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

Failed merges:

r? @ghost

Create a similar rollup

ChayimFriedman2 and others added 30 commits May 15, 2026 10:57
For replace_if_let_with_match assist

Example
---
```rust
fn foo(x: Option<i32>) {
    $0if let Some(x) = x && x != 4 {
        println!("{}", x)
    } else {
        println!("none")
    }
}
```

**Before this PR**

```rust
fn foo(x: Option<i32>) {
    match x {
        Some(x) if x != 4 => println!("{}", x),
        None => println!("none"),
    }
}
```

**After this PR**

```rust
fn foo(x: Option<i32>) {
    match x {
        Some(x) if x != 4 => println!("{}", x),
        _ => println!("none"),
    }
}
```
  Resolves a FIXME at hir-ty/src/method_resolution.rs:151 in
  lookup_method_including_private that previously allowed calls
  like `x.cant_call()` on a `&dyn Foo` receiver to type-check
  without diagnostic when `cant_call(&self) where Self: Sized`,
  even though the `Self: Sized` predicate cannot be satisfied
  by the trait object.

  The existing predicates_require_illegal_sized_bound check in
  confirm.rs already correctly identifies this case (it iterates
  elaborated predicates and looks for `Self: Sized` clauses with
  a `TyKind::Dynamic` self type).  Adds an
  InferenceDiagnostic::MethodCallIllegalSizedBound variant,
  plumbs the cooked diagnostic through hir, and renders it as
  RustcHardError E0277.

  Tests: trait-object call with Sized-bounded method errors;
  trait-object call to dyn-safe method does not; concrete-type
  call to a Sized-bounded method does not.

  Part of rust-lang/rust-analyzer#22140.

Signed-off-by: Onyeka Obi <softwareengineerasaservant@isurvivable.cv>
…ound

method-resolution: emit error for method calls with illegal Sized b…
Example
---
```rust
fn test(a: A) {
    a.$0
}
impl core::ops::Deref for A {
    type Target = B;
    fn deref(&self) -> &Self::Target { loop {} }
}
trait Foo { fn foo(&self) -> u32 {} }
impl Foo for A {}
impl Foo for B {}
impl A { fn foo(&self) -> u8 {} }
impl B { fn foo(&self) -> u16 {} }
struct A {}
struct B {}
```

**Before this PR**

```text
me foo()             fn(&self) -> u8
me foo()            fn(&self) -> u16
me foo() (as Foo)   fn(&self) -> u32
```

**After this PR**

```text
me foo()             fn(&self) -> u8
me foo() (as Foo)   fn(&self) -> u32
```
This reverts commit 3efe801fe27ae68eff3cfe9cf84fb52b7e427ae3.
…l-syntax-factory

Migrate inline_call assist to SyntaxFactory
…ng-assignment

feat(diagnostics): add handler for functional record update in destructuring assignment
Show `unsafe` in the signature help if applicable
Instead of failing to resolve them, which can be confusing.
`TyKind::Pat` is hit on stable through `core::num::NonZero*` types
which use it internally. `TyKind::UnsafeBinder` isn't hit yet, but
added for completeness, since has_drop_glue ends up being called on
hover.
Handle TyKind::{Pat,UnsafeBinder} in has_drop_glue
Since they can be referenced without the enum, and this prevents autoimport of them.
So they can be autoimported for external crates.
Example
---
```rust
mod module {}
fn foo() { $0::bar }
```

**Before this PR**

```rust
mod module {}
fn foo() { module::::bar }
```

**After this PR**

```rust
mod module {}
fn foo() { module::bar }
```
Co-authored-by: Chayim Refael Friedman <chayimfr@gmail.com>
fix: no complete module colons before exists colons
fix: not complete same name inherent deref methods
@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 6, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 6, 2026

💔 Test for 179ed75 failed: CI. Failed job:

@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

JonathanBrouwer commented Jun 6, 2026

@bors treeclosed=5
Closing tree for a little it so I retry the job immediately without having to yield if this fails again
@bors retry

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 6, 2026

Tree closed for PRs with priority less than 5.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 6, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 6, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #157251 (`rust-analyzer` subtree update)
 - #157533 (Subtree sync for rustc_codegen_cranelift)
 - #154742 (Add APIs for case folding to the standard library)
 - #155144 (mir_build: Add an extra intermediate step in MIR building for patterns )
 - #157016 (add `extern "tail"` calling convention)
 - #157264 (diagnostics: Fix ICE building a trait ref in method suggestions)
 - #157386 (Parse deprecated note links separately in rustc_resolve)
 - #157483 (fix windows-gnu TLS leak)
 - #157488 (compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows)
 - #157509 (remove solaris implementation for File::lock, it has the wrong semantics)
 - #157521 (Rename `SyncView::{as_pin => as_pin_ref}`)
 - #156136 (Move tests box)
 - #157365 (Revert "LLVM 23: Run AssignGUIDPass in some places")
 - #157471 (Debug assert that parsed attributes are in the `BUILTIN_ATTRIBUTE_MAP`)
 - #157485 (Rename `errors.rs` file to `diagnostics.rs` (1/N))
 - #157494 (Convert `QueryRegionConstraint` into a struct)
 - #157526 (std tests: skip a slow test on Miri)

Failed merges:

 - #155527 (Replace printables table with `unicode_data.rs` tables)
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job dist-arm-linux-musl failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[114/3898] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/RISCVISAUtils.cpp.o
[115/3898] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ScaledNumber.cpp.o
[116/3898] Building CXX object lib/Demangle/CMakeFiles/LLVMDemangle.dir/MicrosoftDemangle.cpp.o
FAILED: lib/Demangle/CMakeFiles/LLVMDemangle.dir/MicrosoftDemangle.cpp.o 
sccache /usr/bin/c++ -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/lib/Demangle -I/checkout/src/llvm-project/llvm/lib/Demangle -I/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/include -I/checkout/src/llvm-project/llvm/include -ffunction-sections -fdata-sections -fPIC -m64 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -w -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -MD -MT lib/Demangle/CMakeFiles/LLVMDemangle.dir/MicrosoftDemangle.cpp.o -MF lib/Demangle/CMakeFiles/LLVMDemangle.dir/MicrosoftDemangle.cpp.o.d -o lib/Demangle/CMakeFiles/LLVMDemangle.dir/MicrosoftDemangle.cpp.o -c /checkout/src/llvm-project/llvm/lib/Demangle/MicrosoftDemangle.cpp
sccache: error: Timed out waiting for server startup. Maybe the remote service is unreachable?
Run with SCCACHE_LOG=debug SCCACHE_NO_DAEMON=1 to get more information
[117/3898] Building CXX object lib/Demangle/CMakeFiles/LLVMDemangle.dir/Demangle.cpp.o
FAILED: lib/Demangle/CMakeFiles/LLVMDemangle.dir/Demangle.cpp.o 
sccache /usr/bin/c++ -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/lib/Demangle -I/checkout/src/llvm-project/llvm/lib/Demangle -I/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/include -I/checkout/src/llvm-project/llvm/include -ffunction-sections -fdata-sections -fPIC -m64 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -w -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -MD -MT lib/Demangle/CMakeFiles/LLVMDemangle.dir/Demangle.cpp.o -MF lib/Demangle/CMakeFiles/LLVMDemangle.dir/Demangle.cpp.o.d -o lib/Demangle/CMakeFiles/LLVMDemangle.dir/Demangle.cpp.o -c /checkout/src/llvm-project/llvm/lib/Demangle/Demangle.cpp
sccache: error: Timed out waiting for server startup. Maybe the remote service is unreachable?
Run with SCCACHE_LOG=debug SCCACHE_NO_DAEMON=1 to get more information
[118/3898] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/SHA1.cpp.o
[119/3898] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ScopedPrinter.cpp.o
ninja: build stopped: subcommand failed.

thread 'main' (1316) panicked at /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cmake-0.1.54/src/lib.rs:1119:5:
---
   0: __rustc::rust_begin_unwind
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/panicking.rs:689:5
   1: core::panicking::panic_fmt
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/core/src/panicking.rs:80:14
   2: cmake::fail
   3: cmake::run
   4: <cmake::Config>::build
   5: <bootstrap::core::build_steps::llvm::Llvm as bootstrap::core::builder::Step>::run
             at /checkout/src/bootstrap/src/core/build_steps/llvm.rs:553:13
   6: <bootstrap::core::builder::Builder>::ensure::<bootstrap::core::build_steps::llvm::Llvm>
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1596:36
   7: <bootstrap::core::build_steps::llvm::Llvm as bootstrap::core::builder::Step>::run
             at /checkout/src/bootstrap/src/core/build_steps/llvm.rs:500:25
---
  11: <bootstrap::core::builder::Builder>::compiler
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1166:14
  12: <bootstrap::core::build_steps::dist::Rustc as bootstrap::core::builder::Step>::make_run
             at /checkout/src/bootstrap/src/core/build_steps/dist.rs:495:42
  13: <bootstrap::core::builder::StepDescription>::maybe_run
             at /checkout/src/bootstrap/src/core/builder/mod.rs:476:13
  14: bootstrap::core::builder::cli_paths::match_paths_to_steps_and_run
             at /checkout/src/bootstrap/src/core/builder/cli_paths.rs:141:22
  15: <bootstrap::core::builder::Builder>::run_step_descriptions
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1139:9
  16: <bootstrap::core::builder::Builder>::execute_cli
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1118:14
  17: <bootstrap::Build>::build
             at /checkout/src/bootstrap/src/lib.rs:803:25
  18: bootstrap::main
             at /checkout/src/bootstrap/src/bin/main.rs:130:11
  19: <fn() as core::ops::function::FnOnce<()>>::call_once
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/core/src/ops/function.rs:250:5

@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 6, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 6, 2026

💔 Test for 20f0a86 failed: CI. Failed job:

@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors retry

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 6, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 6, 2026

⌛ Testing commit 52921a2 with merge 5e9b677...

Workflow: https://github.com/rust-lang/rust/actions/runs/27072041695

rust-bors Bot pushed a commit that referenced this pull request Jun 6, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #157251 (`rust-analyzer` subtree update)
 - #157533 (Subtree sync for rustc_codegen_cranelift)
 - #154742 (Add APIs for case folding to the standard library)
 - #155144 (mir_build: Add an extra intermediate step in MIR building for patterns )
 - #157016 (add `extern "tail"` calling convention)
 - #157264 (diagnostics: Fix ICE building a trait ref in method suggestions)
 - #157386 (Parse deprecated note links separately in rustc_resolve)
 - #157483 (fix windows-gnu TLS leak)
 - #157488 (compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows)
 - #157509 (remove solaris implementation for File::lock, it has the wrong semantics)
 - #157521 (Rename `SyncView::{as_pin => as_pin_ref}`)
 - #156136 (Move tests box)
 - #157365 (Revert "LLVM 23: Run AssignGUIDPass in some places")
 - #157471 (Debug assert that parsed attributes are in the `BUILTIN_ATTRIBUTE_MAP`)
 - #157485 (Rename `errors.rs` file to `diagnostics.rs` (1/N))
 - #157494 (Convert `QueryRegionConstraint` into a struct)
 - #157526 (std tests: skip a slow test on Miri)

Failed merges:

 - #155527 (Replace printables table with `unicode_data.rs` tables)
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors treeopen

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 6, 2026

Tree is now open for merging.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 6, 2026

☀️ Try build successful (CI)
Build commit: e33b5b1 (e33b5b134fd4f630892e6e4bc0d87fcba9acdff3, parent: 8954863c81df429ebf96ea38a16c76f209995833)

@jhpratt
Copy link
Copy Markdown
Member

jhpratt commented Jun 7, 2026

No output on msvc in quite a while; assuming this is stalled. I'll likely end up creating a larger rollup after a couple nevers run, but leaving this open for now.

@bors r-

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 7, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 7, 2026

This pull request was unapproved.

Auto build was cancelled due to unapproval. Cancelled workflows:

View changes since this unapproval

@jhpratt jhpratt closed this Jun 7, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.