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 7 pull requests #133877

Closed
wants to merge 28 commits into from
Closed

Rollup of 7 pull requests #133877

wants to merge 28 commits into from

Conversation

fmease
Copy link
Member

@fmease fmease commented Dec 4, 2024

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Urgau and others added 28 commits December 2, 2024 18:43
… to `pattern_type_macro`

That's what the gates are actually gating, and the single char difference in naming was not helpful either
The `println!();` statement's span doesn't include the `;`, and the modified suggestions where trying to get the `;` by getting the differenece between the statement's and the expression's spans, which was an empty suggestion.

Fix rust-lang#133833, fix rust-lang#133834.
Centralize emitting an error in `const_to_pat` so that all errors from that evaluating a `const` in a pattern can add addditional information. With this, now point at the `const` item's definition:

```
error[E0158]: constant pattern depends on a generic parameter
  --> $DIR/associated-const-type-parameter-pattern.rs:20:9
   |
LL | pub trait Foo {
   | -------------
LL |     const X: EFoo;
   |     ------------- constant defined here
...
LL |         A::X => println!("A::X"),
   |         ^^^^
```
Silence errors that are implied by the errors in the `const` item definition.

Add a primary span label.
Conform to error style guide.
```
error[E0158]: constant pattern depends on a generic parameter, which is not allowed
  --> $DIR/associated-const-type-parameter-pattern.rs:20:9
   |
LL | pub trait Foo {
   | -------------
LL |     const X: EFoo;
   |     ------------- constant defined here
...
LL | pub fn test<A: Foo, B: Foo>(arg: EFoo) {
   |             - constant depends on this generic param
LL |     match arg {
LL |         A::X => println!("A::X"),
   |         ^^^^ `const` depends on a generic parameter
```
- Add primary span labels.
- Point at const generic parameter used as pattern.
- Point at statics used as pattern.
- Point at let bindings used in const pattern.
```
error: trait object `dyn Send` cannot be used in patterns
  --> $DIR/issue-70972-dyn-trait.rs:6:9
   |
LL | const F: &'static dyn Send = &7u32;
   | -------------------------- constant defined here
...
LL |         F => panic!(),
   |         ^ trait object can't be used in patterns
```
- Point at type that should derive `PartialEq` to be structural.
- Point at manual `impl PartialEq`, explaining that it is not sufficient to be structural.

```
error: constant of non-structural type `MyType` in a pattern
  --> $DIR/const-partial_eq-fallback-ice.rs:14:12
   |
LL | struct MyType;
   | ------------- `MyType` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
...
LL | const CONSTANT: &&MyType = &&MyType;
   | ------------------------ constant defined here
...
LL |     if let CONSTANT = &&MyType {
   |            ^^^^^^^^ constant of non-structural type
   |
note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
  --> $DIR/const-partial_eq-fallback-ice.rs:5:1
   |
LL | impl PartialEq<usize> for MyType {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
Unify wording with the regular non-structural type error.
…e" error

Point at types that need to be marked with `#[derive(PartialEq)]`.

We use a visitor to look at a type that isn't structural, looking for all ADTs that don't derive `PartialEq`. These can either be manual `impl PartialEq`s or no `impl` at all, so we differentiate between those two cases to provide more context to the user. We also only point at types and impls from the local crate, otherwise show only a note.

```
error: constant of non-structural type `&[B]` in a pattern
  --> $DIR/issue-61188-match-slice-forbidden-without-eq.rs:15:9
   |
LL | struct B(i32);
   | -------- must be annotated with `#[derive(PartialEq)]` to be usable in patterns
LL |
LL | const A: &[B] = &[];
   | ------------- constant defined here
...
LL |         A => (),
   |         ^ constant of non-structural type
   |
   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
```
…isons, r=cjgillot

Add lint against function pointer comparisons

This is kind of a follow-up to rust-lang#117758 where we added a lint against wide pointer comparisons for being ambiguous and unreliable; well function pointer comparisons are also unreliable. We should IMO follow a similar logic and warn people about it.

-----

## `unpredictable_function_pointer_comparisons`

*warn-by-default*

The `unpredictable_function_pointer_comparisons` lint checks comparison of function pointer as the operands.

### Example

```rust
fn foo() {}
let a = foo as fn();

let _ = a == foo;
```

### Explanation

Function pointers comparisons do not produce meaningful result since they are never guaranteed to be unique and could vary between different code generation units. Furthermore different function could have the same address after being merged together.

----

This PR also uplift the very similar `clippy::fn_address_comparisons` lint, which only linted on if one of the operand was an `ty::FnDef` while this PR lints proposes to lint on all `ty::FnPtr` and `ty::FnDef`.

``@rustbot`` labels +I-lang-nominated

~~Edit: Blocked on rust-lang/libs-team#323 being accepted and it's follow-up pr~~
…fmease

Fix suggestion when shorthand `self` has erroneous type

Fixes rust-lang#122086

r? estebank
Add context to "const in pattern" errors

*Each commit addresses specific diagnostics.*

- Add primary span labels
- Point at `const` item, and `const` generic param definition
- Reword messages and notes
- Point at generic param through which an associated `const` is being referenced
- Silence const in pattern with evaluation errors when they come from `const` items that already emit a diagnostic
- On non-structural type in const used as pattern, point at the type that should derive `PartialEq`
Do not emit empty suggestion

The `println!();` statement's span doesn't include the `;`, and the modified suggestions where trying to get the `;` by getting the differenece between the statement's and the expression's spans, which was an empty suggestion.

Fix rust-lang#133833, fix rust-lang#133834.
Rename `core_pattern_type` and `core_pattern_types` lib feature  gates to `pattern_type_macro`

That's what the gates are actually gating, and the single char difference in naming was not helpful either

fixes rust-lang#128987
…, r=oli-obk

No need to create placeholders for GAT args in confirm_object_candidate

We no longer need this logic to add placeholders for GAT args since with the removal of the `gat_extended` feature gate (rust-lang#133768) we no longer allow GATs in dyn trait anyways.

r? oli-obk
…li-obk

`fn_sig_for_fn_abi` should return a `ty::FnSig`, no need for a binder

r? oli-obk

Split out of rust-lang#133122
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 4, 2024
@rustbot rustbot added 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. rollup A PR which is a rollup labels Dec 4, 2024
@fmease
Copy link
Member Author

fmease commented Dec 4, 2024

@bors r+ p=5 rollup=never

@bors
Copy link
Contributor

bors commented Dec 4, 2024

📌 Commit ccb6845 has been approved by fmease

It is now in the queue for this repository.

@bors bors 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 Dec 4, 2024
@bors
Copy link
Contributor

bors commented Dec 4, 2024

⌛ Testing commit ccb6845 with merge f54d5f3...

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 4, 2024
Rollup of 7 pull requests

Successful merges:

 - rust-lang#118833 (Add lint against function pointer comparisons)
 - rust-lang#122161 (Fix suggestion when shorthand `self` has erroneous type)
 - rust-lang#133233 (Add context to "const in pattern" errors)
 - rust-lang#133843 (Do not emit empty suggestion)
 - rust-lang#133863 (Rename `core_pattern_type` and `core_pattern_types` lib feature  gates to `pattern_type_macro`)
 - rust-lang#133872 (No need to create placeholders for GAT args in confirm_object_candidate)
 - rust-lang#133874 (`fn_sig_for_fn_abi` should return a `ty::FnSig`, no need for a binder)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job dist-x86_64-msvc failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[2024-12-05T00:44:11Z DEBUG collector::compile::benchmark] Benchmark iteration 1/1
[2024-12-05T00:44:11Z INFO  collector::compile::execute] run_rustc with incremental=false, profile=Check, scenario=Some(Full), patch=None, backend=Llvm, phase=benchmark
[2024-12-05T00:44:11Z DEBUG collector::compile::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "path+file:///C:/a/_temp/msys64/tmp/.tmphGqWYs#externs@0.1.0" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln"
[2024-12-05T00:44:11Z INFO  collector::compile::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrFull), patch=None, backend=Llvm, phase=benchmark
[2024-12-05T00:44:11Z DEBUG collector::compile::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "path+file:///C:/a/_temp/msys64/tmp/.tmphGqWYs#externs@0.1.0" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\a\\_temp\\msys64\\tmp\\.tmphGqWYs\\incremental-state"
[2024-12-05T00:44:12Z INFO  collector::compile::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrUnchanged), patch=None, backend=Llvm, phase=benchmark
[2024-12-05T00:44:12Z DEBUG collector::compile::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "path+file:///C:/a/_temp/msys64/tmp/.tmphGqWYs#externs@0.1.0" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\a\\_temp\\msys64\\tmp\\.tmphGqWYs\\incremental-state"
[2024-12-05T00:44:12Z DEBUG collector::compile::benchmark] Benchmark iteration 1/1
[2024-12-05T00:44:12Z INFO  collector::compile::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None, backend=Llvm, phase=benchmark
[2024-12-05T00:44:12Z DEBUG collector::compile::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "path+file:///C:/a/_temp/msys64/tmp/.tmpne1fuG#externs@0.1.0" "--" "--wrap-rustc-with" "Eprintln"
[2024-12-05T00:44:13Z INFO  collector::compile::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None, backend=Llvm, phase=benchmark
---
[2024-12-05T00:44:27Z DEBUG collector::compile::benchmark] Benchmark iteration 1/1
[2024-12-05T00:44:27Z INFO  collector::compile::execute] run_rustc with incremental=false, profile=Check, scenario=Some(Full), patch=None, backend=Llvm, phase=benchmark
[2024-12-05T00:44:27Z DEBUG collector::compile::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "path+file:///C:/a/_temp/msys64/tmp/.tmpEKxpOW#token-stream-stress@0.0.0" "--profile" "check" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln"
[2024-12-05T00:44:28Z INFO  collector::compile::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrFull), patch=None, backend=Llvm, phase=benchmark
[2024-12-05T00:44:28Z DEBUG collector::compile::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "path+file:///C:/a/_temp/msys64/tmp/.tmpEKxpOW#token-stream-stress@0.0.0" "--profile" "check" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\a\\_temp\\msys64\\tmp\\.tmpEKxpOW\\incremental-state"
[2024-12-05T00:44:28Z INFO  collector::compile::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrUnchanged), patch=None, backend=Llvm, phase=benchmark
[2024-12-05T00:44:28Z DEBUG collector::compile::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "path+file:///C:/a/_temp/msys64/tmp/.tmpEKxpOW#token-stream-stress@0.0.0" "--profile" "check" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\a\\_temp\\msys64\\tmp\\.tmpEKxpOW\\incremental-state"
[2024-12-05T00:44:28Z DEBUG collector::compile::benchmark] Benchmark iteration 1/1
[2024-12-05T00:44:28Z INFO  collector::compile::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None, backend=Llvm, phase=benchmark
[2024-12-05T00:44:28Z DEBUG collector::compile::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "path+file:///C:/a/_temp/msys64/tmp/.tmpVTlz7V#token-stream-stress@0.0.0" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln"
[2024-12-05T00:44:29Z INFO  collector::compile::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None, backend=Llvm, phase=benchmark
---
   Compiling build_helper v0.1.0 (C:\a\rust\rust\src\build_helper)
   Compiling xz2 v0.1.7
error: linking with `link.exe` failed: exit code: 1104
  |
  = note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.42.34433\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "C:\\a\\_temp\\msys64\\tmp\\rustceFSKxl\\symbols.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.0kb6foyu0o0zc9slxmaeo7s5h.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.236von38jn69elydcjgq2l5zv.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.24pftdabdbwr1lx53msjkgc65.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.2vlrvdlh6b5zvl76ovf96q2h6.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.4x03f679dixyoapuecp569ewj.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.5pjanl8y46qlst1unx5a7f34f.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.67sb0ir3id4nujo3nbugg2ugp.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.6leh0tlw23oml8m4so0k4ly2u.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.6r9dpwyqda77eb8zj1s0iztnd.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.6s7lbqa9bpbqeo3vcowxth3af.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.8d86wczhever964ggegefek6z.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.8tq8e0lrxauo2gq2n0y4vssx9.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.8uc56t179b74boks8e0or557s.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.8ut9gvke5izf3n8aveesaapvd.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.9fiyhegmef66sbivmllz6n0ro.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.9uwv8u6jyoxcpkiyq17ce2d4x.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.a51we19fcz9ratbrnensvpaks.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.bcwtj6b00myl4awd9qp2nd8sy.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.c1j32jvhcvzwgmcng2z4yuqrd.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.clcdnrlu252n0wll6fxlomybl.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.dqywipamyofejow8dtedsnzy8.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.dyto9ip32izkmurxdtj5on8dt.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.ety5guyqbuoycms1gtt1b6bi9.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.euqvd27vqjkz0u20zu6cdokjq.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.8ff1wh5vgzqx9i6mjnr8nc2qf.rcgu.o" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\libcc-2ba5b0524e45987b.rlib" "C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\libshlex-9723080df0f53cd7.rlib" "C:\\a\\rust\\rust\\build\\unpacked-dist\\rustc-nightly-x86_64-pc-windows-msvc\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-c09b6dac30a2ec7e.rlib" "C:\\a\\rust\\rust\\build\\unpacked-dist\\rustc-nightly-x86_64-pc-windows-msvc\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-f2b3338f491e0297.rlib" "C:\\a\\rust\\rust\\build\\unpacked-dist\\rustc-nightly-x86_64-pc-windows-msvc\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libwindows_targets-650a9189f256d76e.rlib" "C:\\a\\rust\\rust\\build\\unpacked-dist\\rustc-nightly-x86_64-pc-windows-msvc\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_demangle-7ce081cb32ea6b96.rlib" "C:\\a\\rust\\rust\\build\\unpacked-dist\\rustc-nightly-x86_64-pc-windows-msvc\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd_detect-f80ba4624fd5706a.rlib" "C:\\a\\rust\\rust\\build\\unpacked-dist\\rustc-nightly-x86_64-pc-windows-msvc\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libhashbrown-6fe121940227f580.rlib" "C:\\a\\rust\\rust\\build\\unpacked-dist\\rustc-nightly-x86_64-pc-windows-msvc\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_alloc-316118e870ffb802.rlib" "C:\\a\\rust\\rust\\build\\unpacked-dist\\rustc-nightly-x86_64-pc-windows-msvc\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-af3779e04d2c5b3e.rlib" "C:\\a\\rust\\rust\\build\\unpacked-dist\\rustc-nightly-x86_64-pc-windows-msvc\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcfg_if-d8b574f6478ea10a.rlib" "C:\\a\\rust\\rust\\build\\unpacked-dist\\rustc-nightly-x86_64-pc-windows-msvc\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-8a746df5f193254d.rlib" "C:\\a\\rust\\rust\\build\\unpacked-dist\\rustc-nightly-x86_64-pc-windows-msvc\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_core-5a536bba43fbe272.rlib" "C:\\a\\rust\\rust\\build\\unpacked-dist\\rustc-nightly-x86_64-pc-windows-msvc\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-45b7a05b67ddb8c6.rlib" "C:\\a\\rust\\rust\\build\\unpacked-dist\\rustc-nightly-x86_64-pc-windows-msvc\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-c25bba97e86b102c.rlib" "kernel32.lib" "advapi32.lib" "ole32.lib" "oleaut32.lib" "kernel32.lib" "kernel32.lib" "advapi32.lib" "ntdll.lib" "userenv.lib" "ws2_32.lib" "dbghelp.lib" "/defaultlib:msvcrt" "/NXCOMPAT" "/LIBPATH:C:\\Users\\runneradmin\\.cargo\\registry\\src\\index.crates.io-6f17d22bba15001f\\windows_x86_64_msvc-0.52.6\\lib" "/LIBPATH:C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.42.34433\\atlmfc\\lib\\x64" "/LIBPATH:C:\\a\\rust\\rust\\build\\bootstrap\\debug\\build\\lzma-sys-f48e0b6c9b4b71b3\\out" "/OUT:C:\\a\\rust\\rust\\build\\bootstrap\\debug\\deps\\sccache_plus_cl.exe" "/OPT:REF,NOICF" "/DEBUG" "/PDBALTPATH:%_PDB%" "/NATVIS:C:\\a\\rust\\rust\\build\\unpacked-dist\\rustc-nightly-x86_64-pc-windows-msvc\\rustc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\a\\rust\\rust\\build\\unpacked-dist\\rustc-nightly-x86_64-pc-windows-msvc\\rustc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\a\\rust\\rust\\build\\unpacked-dist\\rustc-nightly-x86_64-pc-windows-msvc\\rustc\\lib\\rustlib\\etc\\libcore.natvis" "/NATVIS:C:\\a\\rust\\rust\\build\\unpacked-dist\\rustc-nightly-x86_64-pc-windows-msvc\\rustc\\lib\\rustlib\\etc\\libstd.natvis"
  = note: LINK : fatal error LNK1104: cannot open file 'C:\a\rust\rust\build\bootstrap\debug\deps\sccache_plus_cl.exe'␍


error: could not compile `bootstrap` (bin "sccache-plus-cl") due to 1 previous error
warning: build failed, waiting for other jobs to finish...
failed to run: C:/a/rust/rust/build/unpacked-dist/cargo-nightly-x86_64-pc-windows-msvc/cargo/bin/cargo.exe build --manifest-path C:\a\rust\rust\src/bootstrap/Cargo.toml -Zroot-dir=C:\a\rust\rust
[2024-12-05T02:32:06.300Z INFO  opt_dist::timer] Section `Run tests` ended: FAIL (39.66s)`
[2024-12-05T02:32:06.300Z INFO  opt_dist] Timer results
    -----------------------------------------------------------------
    Stage 1 (Rustc PGO):                            4056.42s (40.63%)

@bors
Copy link
Contributor

bors commented Dec 5, 2024

💔 Test failed - checks-actions

@bors bors 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 Dec 5, 2024
@compiler-errors
Copy link
Member

@bors retry

@bors bors 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 Dec 5, 2024
@bors
Copy link
Contributor

bors commented Dec 5, 2024

⌛ Testing commit ccb6845 with merge 40a662e...

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 5, 2024
Rollup of 7 pull requests

Successful merges:

 - rust-lang#118833 (Add lint against function pointer comparisons)
 - rust-lang#122161 (Fix suggestion when shorthand `self` has erroneous type)
 - rust-lang#133233 (Add context to "const in pattern" errors)
 - rust-lang#133843 (Do not emit empty suggestion)
 - rust-lang#133863 (Rename `core_pattern_type` and `core_pattern_types` lib feature  gates to `pattern_type_macro`)
 - rust-lang#133872 (No need to create placeholders for GAT args in confirm_object_candidate)
 - rust-lang#133874 (`fn_sig_for_fn_abi` should return a `ty::FnSig`, no need for a binder)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job dist-x86_64-msvc failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[2024-12-05T04:04:58Z DEBUG collector::compile::benchmark] Benchmark iteration 1/1
[2024-12-05T04:04:58Z INFO  collector::compile::execute] run_rustc with incremental=false, profile=Check, scenario=Some(Full), patch=None, backend=Llvm, phase=benchmark
[2024-12-05T04:04:58Z DEBUG collector::compile::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "path+file:///C:/a/_temp/msys64/tmp/.tmpKczhCT#externs@0.1.0" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln"
[2024-12-05T04:04:58Z INFO  collector::compile::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrFull), patch=None, backend=Llvm, phase=benchmark
[2024-12-05T04:04:58Z DEBUG collector::compile::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "path+file:///C:/a/_temp/msys64/tmp/.tmpKczhCT#externs@0.1.0" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\a\\_temp\\msys64\\tmp\\.tmpKczhCT\\incremental-state"
[2024-12-05T04:04:59Z INFO  collector::compile::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrUnchanged), patch=None, backend=Llvm, phase=benchmark
[2024-12-05T04:04:59Z DEBUG collector::compile::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "path+file:///C:/a/_temp/msys64/tmp/.tmpKczhCT#externs@0.1.0" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\a\\_temp\\msys64\\tmp\\.tmpKczhCT\\incremental-state"
[2024-12-05T04:04:59Z DEBUG collector::compile::benchmark] Benchmark iteration 1/1
[2024-12-05T04:04:59Z INFO  collector::compile::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None, backend=Llvm, phase=benchmark
[2024-12-05T04:04:59Z DEBUG collector::compile::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "path+file:///C:/a/_temp/msys64/tmp/.tmpwBbZ1m#externs@0.1.0" "--" "--wrap-rustc-with" "Eprintln"
[2024-12-05T04:05:00Z INFO  collector::compile::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None, backend=Llvm, phase=benchmark
---
   Compiling rustc_driver v0.0.0 (C:\a\rust\rust\compiler\rustc_driver)
[RUSTC-TIMING] rustc_driver test:false 5.244
error: linking with `link.exe` failed: exit code: 1104
  |
  = note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.42.34433\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\symbols.o" "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-rustc\\x86_64-pc-windows-msvc\\release\\deps\\rustc_main-690ca8aaa86cd595.rustc_main.92300c1ea90c9e23-cgu.0.rcgu.o" "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-rustc\\x86_64-pc-windows-msvc\\release\\deps\\rustc_driver-e7bdfad83289e3f8.dll.lib" "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-c25bba97e86b102c.rlib" "psapi.lib" "shell32.lib" "ole32.lib" "uuid.lib" "advapi32.lib" "ws2_32.lib" "ntdll.lib" "kernel32.lib" "advapi32.lib" "ole32.lib" "oleaut32.lib" "advapi32.lib" "cfgmgr32.lib" "gdi32.lib" "kernel32.lib" "msimg32.lib" "opengl32.lib" "user32.lib" "winspool.lib" "bcrypt.lib" "advapi32.lib" "legacy_stdio_definitions.lib" "kernel32.lib" "kernel32.lib" "advapi32.lib" "ntdll.lib" "userenv.lib" "ws2_32.lib" "dbghelp.lib" "/defaultlib:libcmt" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\advapi32.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\api-ms-win-core-errorhandling-l1-1-3.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\api-ms-win-core-file-fromapp-l1-1-0.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\api-ms-win-core-handle-l1-1-0.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\api-ms-win-core-ioring-l1-1-0.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\api-ms-win-core-memory-l1-1-3.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\api-ms-win-core-memory-l1-1-4.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\api-ms-win-core-memory-l1-1-5.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\api-ms-win-core-memory-l1-1-6.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\api-ms-win-core-memory-l1-1-7.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\api-ms-win-core-memory-l1-1-8.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\api-ms-win-core-synch-l1-2-0.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\api-ms-win-core-sysinfo-l1-2-0.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\api-ms-win-core-sysinfo-l1-2-3.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\api-ms-win-core-sysinfo-l1-2-4.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\api-ms-win-core-sysinfo-l1-2-6.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\api-ms-win-core-util-l1-1-1.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\api-ms-win-core-winrt-error-l1-1-0.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\api-ms-win-core-winrt-l1-1-0.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\api-ms-win-core-wow64-l1-1-1.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\api-ms-win-security-base-l1-2-2.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\avrt.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\bcp47mrm.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\bcryptprimitives.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\clfsw32.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\dbghelp.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\elscore.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\gdi32.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\icu.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\imagehlp.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\kernel32.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\ktmw32.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\netapi32.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\normaliz.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\ntdll.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\ntdllk.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\ole32.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\oleacc.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\oleaut32.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\propsys.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\psapi.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\rtworkq.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\txfw32.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\user32.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\usp10.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\version.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcPClL7W\\wofutil.dll_imports_indirect.lib" "/NXCOMPAT" "/LIBPATH:C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.42.34433\\atlmfc\\lib\\x64" "/LIBPATH:C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-rustc\\x86_64-pc-windows-msvc\\release\\build\\stacker-51665ada3368c7c5\\out" "/LIBPATH:C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.42.34433\\atlmfc\\lib\\x64" "/LIBPATH:C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-rustc\\x86_64-pc-windows-msvc\\release\\build\\psm-18bbb9b2c1f4a85c\\out" "/LIBPATH:C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.42.34433\\atlmfc\\lib\\x64" "/LIBPATH:C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-rustc\\x86_64-pc-windows-msvc\\release\\build\\blake3-40658902d69c9924\\out" "/LIBPATH:C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.42.34433\\atlmfc\\lib\\x64" "/LIBPATH:C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-rustc\\x86_64-pc-windows-msvc\\release\\build\\blake3-40658902d69c9924\\out" "/LIBPATH:C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.42.34433\\atlmfc\\lib\\x64" "/LIBPATH:C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-rustc\\x86_64-pc-windows-msvc\\release\\build\\rustc_llvm-2e0139d76762918c\\out" "/LIBPATH:C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\llvm\\lib" "/OUT:C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-rustc\\x86_64-pc-windows-msvc\\release\\deps\\rustc_main-690ca8aaa86cd595.exe" "/OPT:REF,ICF" "/DEBUG" "/PDBALTPATH:%_PDB%" "/MANIFEST:EMBED" "/MANIFESTINPUT:C:\\a\\rust\\rust\\compiler\\rustc\\Windows Manifest.xml" "/WX"
  = note: LINK : fatal error LNK1104: cannot open file 'C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage1-rustc\x86_64-pc-windows-msvc\release\deps\rustc_main-690ca8aaa86cd595.exe'␍

[RUSTC-TIMING] rustc_main test:false 0.698
error: could not compile `rustc-main` (bin "rustc-main") due to 1 previous error
Build completed unsuccessfully in 0:07:40

@bors
Copy link
Contributor

bors commented Dec 5, 2024

💔 Test failed - checks-actions

@bors bors 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 Dec 5, 2024
@compiler-errors
Copy link
Member

another spurious msvc failure

@bors retry

@bors bors 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 Dec 5, 2024
@jieyouxu jieyouxu added the CI-spurious-fail-msvc CI spurious failure: target env msvc label Dec 5, 2024
@fmease
Copy link
Member Author

fmease commented Dec 5, 2024

Closing in favor of #133893 that includes all PRs that are rolled up here plus a p=10 revert PR (and two more rollup=always PRs).

@fmease fmease closed this Dec 5, 2024
@fmease fmease deleted the rollup-909elhb branch December 5, 2024 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc CI-spurious-fail-msvc CI spurious failure: target env msvc rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants