Skip to content

Rollup of 11 pull requests #140096

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

Closed
wants to merge 28 commits into from
Closed

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Apr 21, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Jethro Beekman and others added 28 commits April 14, 2025 13:36
Also update the symbol names as items have moved around a bit. The actual
name isn't that important, it just needs to be unique. But for debugging
it can be useful for it to point to the right place.
- Reworked the test as a *centralized* version of checking that certain
  targets correctly require `-C target-cpu` being specified.
- Document test intention.
- Move `amdgpu-require-explicit-cpu.rs` under new dir
  `tests/ui/target-cpu/`
  - No other ui subdir really fits this "requires `-Ctarget-cpu`" check.
- `tests/ui/augmented-assignment-feature-gate-cross.rs`:
  - This was *originally* to feature-gate overloaded OpAssign
    cross-crate, but now let's keep it as a smoke test.
  - Renamed as `augmented-assignment-cross-crate.rs`.
  - Relocated under `tests/ui/binop/`.
-  `tests/ui/augmented-assignments.rs`:
  - Documented test intent.
  - Moved under `tests/ui/borrowck/`.
- `tests/ui/augmented-assignment-rpass.rs`:
  - Renamed to drop the `-rpass` suffix, since this was leftover from
    when `run-pass` test suite was a thing.
  - Moved under `tests/ui/binop/`.
- Reformat the test.
- Document test intention.
- Move test under `tests/ui/inference/`.
…r=joboet

Clarify why SGX code specifies linkage/symbol names for certain statics

Specifying linkage/symbol name is solely to ensure a single instance between the `std` crate and its unit tests.

Also update the symbol names as items have moved around a bit. The actual name isn't that important, it just needs to be unique. But for debugging it can be useful for it to point to the right place.
… r=jhpratt

fix missing word in comment

a very simple fix, rectifying a situation in which a word was accidentally .
…ratt

SystemTime doc tweaks

* Change the `UNIX_EPOCH` link in the `SystemTime` docs to point to the associated constant, not the module level constant. The former seems to be the recommended way to access it, since aiui the only reason the module constant exists in the first place is that associated constants weren't stable yet at the time.
* Reword the comment in the `SystemTime` example - "an error occurred!" is a tad misleading; I feel like it implies a system error out of our control while `SystemTimeError` is more of a logic error.

I was originally just gonna do the first thing but I noticed the second and figured I may as well.

I'm also somewhat surprised that there aren't more in-depth module level docs for `std::time`; they don't even mention `SystemTime` at all. I might make another PR for that but mainly just wanted to flag it.
docs(LocalKey<T>): clarify that T's Drop shouldn't panic

Clarify that should a TLS destructor panics, the process will abort.

Also, an abort may be obfuscated as the process can be terminated with `SIGSEGV` or [`STATUS_STACK_BUFFER_OVERRUN`](https://devblogs.microsoft.com/oldnewthing/20190108-00/?p=100655) (i.e., `SIGABRT` is not guaranteed), so explicitly prints that the process was aborted.

Context:
https://users.rust-lang.org/t/status-stack-buffer-overrun-on-windows-without-any-usage-of-unsafe/128417

`@rustbot` label -T-compiler
…r=lcnr

Don't ICE on pending obligations from deep normalization in a loop

See the comment I left inline in `compiler/rustc_trait_selection/src/traits/normalize.rs`.

Fixes rust-lang#133868

r? lcnr
…errors

Advent of `tests/ui` (misc cleanups and improvements) [4/N]

Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang#133895.

### Review advice

- Best reviewed commit-by-commit.
- I can squash commits before merge, commits are separate to make it easier to review.
…ercote

Fix error when an intra doc link is trying to resolve an empty associated item

Fixes rust-lang#140026.

Assigning `@nnethercote` since they're the one who wrote the initial change.

I updated rustdoc code instead of compiler's because I think it makes more sense that the caller ensures on their side that the name they're looking for isn't empty.

r? `@nnethercote`
…meGomez

rustdoc-json: Improve test for auto-trait impls

The TODO is fixable now due-to rust-lang#138763. While I was here I realized there's probably a a few more things we should also test.

r? `@GuillaumeGomez`
…aumeGomez

jsondocck: Require command is at start of line

In one place we use `///`@`` instead of `//`@`.` The test-runner allowed it, but it probably shouldn't. Ran into by `@lolbinarycat` in rust-lang#132748 (comment):

```
error: unknown disambiguator `?(`
##[error] --> /checkout/tests/rustdoc-json/fns/return_type_alias.rs:3:25
  |
3 | ///@ set foo = "$.index[?(`@.name=='Foo')].id"`
  |                         ^^
  |
```

Maybe it's also worth erroring on this like we added in rust-lang#137103

r? `@GuillaumeGomez`
@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend O-SGX Target: SGX labels Apr 21, 2025
@jhpratt jhpratt added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. CI-spurious-fail-msvc CI spurious failure: target env msvc labels Apr 21, 2025
@bors
Copy link
Collaborator

bors commented Apr 21, 2025

⌛ Testing commit 4c5a95f with merge 257d645...

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 21, 2025
Rollup of 11 pull requests

Successful merges:

 - rust-lang#139795 (Clarify why SGX code specifies linkage/symbol names for certain statics)
 - rust-lang#139946 (fix missing word in comment)
 - rust-lang#139982 (SystemTime doc tweaks)
 - rust-lang#140009 (docs(LocalKey<T>): clarify that T's Drop shouldn't panic)
 - rust-lang#140021 (Don't ICE on pending obligations from deep normalization in a loop)
 - rust-lang#140036 (Advent of `tests/ui` (misc cleanups and improvements) [4/N])
 - rust-lang#140047 (remove a couple clones)
 - rust-lang#140052 (Fix error when an intra doc link is trying to resolve an empty associated item)
 - rust-lang#140074 (rustdoc-json: Improve test for auto-trait impls)
 - rust-lang#140076 (jsondocck: Require command is at start of line)
 - rust-lang#140081 (Update `libc` to 0.2.172)

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)
[2025-04-21T06:36:46Z DEBUG collector::compile::benchmark] Benchmark iteration 1/1
[2025-04-21T06:36:47Z INFO  collector::compile::execute] run_rustc with incremental=false, profile=Opt, scenario=Some(Full), patch=None, backend=Llvm, target=X86_64UnknownLinuxGnu, phase=benchmark
[2025-04-21T06:36:47Z 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:/Users/RUNNER~1/AppData/Local/Temp/.tmpQVBVCW#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln"
[2025-04-21T06:36:47Z INFO  collector::compile::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None, backend=Llvm, target=X86_64UnknownLinuxGnu, phase=benchmark
[2025-04-21T06:36:47Z 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:/Users/RUNNER~1/AppData/Local/Temp/.tmpQVBVCW#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpQVBVCW\\incremental-state"
[2025-04-21T06:36:48Z INFO  collector::compile::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrUnchanged), patch=None, backend=Llvm, target=X86_64UnknownLinuxGnu, phase=benchmark
[2025-04-21T06:36:48Z 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:/Users/RUNNER~1/AppData/Local/Temp/.tmpQVBVCW#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpQVBVCW\\incremental-state"
Finished benchmark externs (5/8)
Executing benchmark match-stress (6/8)
Preparing match-stress
[2025-04-21T06:36:48Z INFO  collector::compile::execute] run_rustc with incremental=false, profile=Check, scenario=None, patch=None, backend=Llvm, target=X86_64UnknownLinuxGnu, phase=dependencies
[2025-04-21T06:36:48Z INFO  collector::compile::execute] run_rustc with incremental=false, profile=Opt, scenario=None, patch=None, backend=Llvm, target=X86_64UnknownLinuxGnu, phase=dependencies
---
[2025-04-21T06:36:49Z DEBUG collector::compile::benchmark] Benchmark iteration 1/1
[2025-04-21T06:36:49Z INFO  collector::compile::execute] run_rustc with incremental=false, profile=Check, scenario=Some(Full), patch=None, backend=Llvm, target=X86_64UnknownLinuxGnu, phase=benchmark
[2025-04-21T06:36:49Z 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:/Users/RUNNER~1/AppData/Local/Temp/.tmpClqhmo#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln"
[2025-04-21T06:36:50Z INFO  collector::compile::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrFull), patch=None, backend=Llvm, target=X86_64UnknownLinuxGnu, phase=benchmark
[2025-04-21T06:36:50Z 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:/Users/RUNNER~1/AppData/Local/Temp/.tmpClqhmo#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpClqhmo\\incremental-state"
[2025-04-21T06:36:52Z INFO  collector::compile::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrUnchanged), patch=None, backend=Llvm, target=X86_64UnknownLinuxGnu, phase=benchmark
[2025-04-21T06:36:52Z 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:/Users/RUNNER~1/AppData/Local/Temp/.tmpClqhmo#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpClqhmo\\incremental-state"
Running match-stress: Debug + [Full, IncrFull, IncrUnchanged, IncrPatched] + Llvm + X86_64UnknownLinuxGnu
[2025-04-21T06:36:53Z DEBUG collector::compile::benchmark] Benchmark iteration 1/1
[2025-04-21T06:36:53Z INFO  collector::compile::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None, backend=Llvm, target=X86_64UnknownLinuxGnu, phase=benchmark
[2025-04-21T06:36:53Z 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:/Users/RUNNER~1/AppData/Local/Temp/.tmpAvsvty#[email protected]" "--" "--wrap-rustc-with" "Eprintln"
[2025-04-21T06:36:54Z INFO  collector::compile::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None, backend=Llvm, target=X86_64UnknownLinuxGnu, phase=benchmark
---
failures:

---- [mir-opt] tests\mir-opt\strip_debuginfo.rs#TINY stdout ----

thread '[mir-opt] tests\mir-opt\strip_debuginfo.rs#TINY' panicked at src\tools\compiletest\src\runtest.rs:1516:17:
failed to remove and recreate output directory `C:\a\rust\rust\build\x86_64-pc-windows-msvc\test\mir-opt\strip_debuginfo`: Access is denied. (os error 5)
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.


failures:

@bors
Copy link
Collaborator

bors commented Apr 21, 2025

💔 Test failed - checks-actions

@jieyouxu
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 Apr 21, 2025
@jieyouxu
Copy link
Member

If this fails 3 times in a row on msvc, you might want to buy a lottery ticket 😆

@bors
Copy link
Collaborator

bors commented Apr 21, 2025

⌛ Testing commit 4c5a95f with merge 3bd7db2...

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 21, 2025
Rollup of 11 pull requests

Successful merges:

 - rust-lang#139795 (Clarify why SGX code specifies linkage/symbol names for certain statics)
 - rust-lang#139946 (fix missing word in comment)
 - rust-lang#139982 (SystemTime doc tweaks)
 - rust-lang#140009 (docs(LocalKey<T>): clarify that T's Drop shouldn't panic)
 - rust-lang#140021 (Don't ICE on pending obligations from deep normalization in a loop)
 - rust-lang#140036 (Advent of `tests/ui` (misc cleanups and improvements) [4/N])
 - rust-lang#140047 (remove a couple clones)
 - rust-lang#140052 (Fix error when an intra doc link is trying to resolve an empty associated item)
 - rust-lang#140074 (rustdoc-json: Improve test for auto-trait impls)
 - rust-lang#140076 (jsondocck: Require command is at start of line)
 - rust-lang#140081 (Update `libc` to 0.2.172)

r? `@ghost`
`@rustbot` modify labels: rollup
@ChrisDenton
Copy link
Member

Or try to add my workaround to the rollup (#140091). I'm not totally confident it'll help but it can't hurt (IMHO).

@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)
failures:

---- [mir-opt] tests\mir-opt\strip_debuginfo.rs#TINY stdout ----

thread '[mir-opt] tests\mir-opt\strip_debuginfo.rs#TINY' panicked at src\tools\compiletest\src\runtest.rs:1516:17:
failed to remove and recreate output directory `C:\a\rust\rust\build\x86_64-pc-windows-msvc\test\mir-opt\strip_debuginfo`: Access is denied. (os error 5)
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.


failures:

@bors
Copy link
Collaborator

bors commented Apr 21, 2025

💔 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 Apr 21, 2025
@jieyouxu
Copy link
Member

I'm going to make a rollup w/ #140091

@jieyouxu
Copy link
Member

@bors r-

@jieyouxu
Copy link
Member

That's interesting though -- all 3 failures are on the mir-opt strip_debuginfo.rs test. I wonder if there's a timing where maybe the strip process or sth doesn't exist before we try to remove_and_recreate_dir_all

@ChrisDenton
Copy link
Member

ChrisDenton commented Apr 21, 2025

That's odd because I'm pretty sure stripping is a no-op on Windows msvc:

fn debuginfo(&mut self, _strip: Strip, natvis_debugger_visualizers: &[PathBuf]) {

@jieyouxu
Copy link
Member

🤔 yeah idk why it's failing on that specific test...

@jhpratt jhpratt deleted the rollup-0dqrcxa branch April 21, 2025 13:06
@jieyouxu
Copy link
Member

This test is somehow special, in that it also fails on apple (not msvc) #139727 (comment)

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 21, 2025
… r=<try>

[EXPERIMENTAL] `tests/mir-opt/strip_debuginfo.rs` failure investigation

cc rust-lang#140096 (comment), rust-lang#139727 (comment).

r? ghost

try-job: x86_64-apple-1
try-job: x86_64-msvc-1
try-job: dist-x86_64-msvc
@jieyouxu
Copy link
Member

Backlink: #134351

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 21, 2025
… r=<try>

[EXPERIMENTAL] `tests/mir-opt/strip_debuginfo.rs` failure investigation

cc rust-lang#140096 (comment), rust-lang#139727 (comment).
cf. rust-lang#134351.

(Yes this isn't robust, but just in case)

r? ghost

try-job: x86_64-apple-1
try-job: x86_64-msvc-1
try-job: dist-x86_64-msvc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend CI-spurious-fail-msvc CI spurious failure: target env msvc O-SGX Target: SGX rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.