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 #115193

Merged
merged 22 commits into from
Aug 25, 2023
Merged

Rollup of 9 pull requests #115193

merged 22 commits into from
Aug 25, 2023

Conversation

weihanglo
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

RalfJung and others added 22 commits August 19, 2023 12:50
1. Turned patch-binaries-for-nix from a boolean into a ternary flag: true,
   false, and unset.

2. When patch-binaries-for-nix is unset, we continue with the existing NixOS
   detection heuristic (look for nixos in /etc/os-release, if present), but if
   we are not atop NixOS, then issue a note if we see the IN_NIX_SHELL
   environment variable telling the user to consider setting
   patch-binaries-for-nix explicitly.
In addition: Incorporated some review feedback (namely, removed a useless
initial assignment to True that was never read), and unified code a bit more
between bootstrap.py and download.rs (by using the same variable name for the
same concept).
As of commit 7767cbb,
the tests/ui/consts/const-eval/ub-int-array.rs test is
failing on big-endian platforms (in particular s390x),
as the stderr output contains a hex dump that depends
on endianness.

Since this point intentionally verifies the hex dump to
check the uninitialized byte markers, I think we should
not simply standardize away the hex dump as is done with
some of the other tests in this directory.

However, most of the test is already endian-independent.
The only exception is one line of hex dump, which can
also be made endian-independent by choosing appropriate
constants in the source code.

Since the 32bit and 64bit stderr outputs were already
(and remain) identical, I've merged them and removed
the stderr-per-bitwidth marker.

Fixes (again) rust-lang#105383.
elaborate a bit on the (lack of) safety in 'Mmap::map'

Sadly none of the callers of this function even consider it worth mentioning in their unsafe block that what they are doing is completely unsound.
…lauses, r=spastorino

Add smir `predicates_of`

r? `@spastorino`
…ll, r=albertlarsan68

Detect and report nix shell

Better diagnostics for people using nix subshell on non-NixOS.

1. Turned patch-binaries-for-nix from a boolean into a ternary flag: true, false, and unset.

2. When patch-binaries-for-nix is unset, we continue with the existing NixOS detection heuristic (look for nixos in /etc/os-release, if present), but if we are not atop NixOS, then issue a note if we see the IN_NIX_SHELL environment variable telling the user to consider setting patch-binaries-for-nix explicitly.

Fix rust-lang#115073
…ison-error-in-os, r=cuviper

kmc-solid: Import `std::sync::PoisonError` in `std::sys::solid::os`

Follow-up to rust-lang#114968. Fixes a missing import in [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets.

```
 error[E0433]: failed to resolve: use of undeclared type `PoisonError`
 C:\Users\xxxxx\.rustup\toolchains\nightly-2023-08-23-x86_64-pc-windows-gnu\lib\rustlib\src\rust\library\std\src\sys\solid\os.rs(85,36)
   |
85 |     ENV_LOCK.read().unwrap_or_else(PoisonError::into_inner)
   |                                    ^^^^^^^^^^^ use of undeclared type `PoisonError`
   |
```
…r-errors

refactor(lint): translate `RenamedOrRemovedLint`

I was trying to address <rust-lang/cargo#12495> and found that maybe I should refactor relevant lints a bit.

This PR translates `RenamedOrRemovedLint` into fluent file. To make diagnostic types clearer and easier to organize, this PR splits it into two structs.

The second commit adds lifetime annotations for removing unnecessary clones. If people feel too noisy, we can revert such change.

### Possibly relevant UI tests:

* `tests/ui/lint-removed*`
* `tests/ui/lint-renamed*`
* `tests/ui/rustdoc-renamed.rs`
* `tests/rustdoc-ui/lints/unknown-renamed-lints.rs`
…=compiler-errors

Move some ui tests to subdirectories

cc rust-lang#73494
issue-2804 -> `macros/` (there's already the minified `issue-2804-2` there)
issue-17431 -> `structs-enums/struct-rec` and new `structs-enums/enum-rec` (original issue pertains to detection of recursive enums and structs)
issue-29181 and issue-66768 - moved according to the classifier tool
…RalfJung

Fix ub-int-array test for big-endian platforms

As of commit 7767cbb, the tests/ui/consts/const-eval/ub-int-array.rs test is failing on big-endian platforms (in particular s390x), as the stderr output contains a hex dump that depends on endianness.

Since this point intentionally verifies the hex dump to check the uninitialized byte markers, I think we should not simply standardize away the hex dump as is done with some of the other tests in this directory.

However, most of the test is already endian-independent. The only exception is one line of hex dump, which can also be made endian-independent by choosing appropriate constants in the source code.

Since the 32bit and 64bit stderr outputs were already (and remain) identical, I've merged them and removed the stderr-per-bitwidth marker.

Fixes (again) rust-lang#105383.
…r=cjgillot

Add more tests for if_let_guard

Adds tests for borrow checking, name shadowing and interaction with macros.

cc rust-lang#51114
Add symbols for Clippy usage

The `arithmetic_side_effects` lint is always "interning" these non-existing symbols related to math operations causing a bit of a slowdown.
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc O-solid Operating System: SOLID S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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 Aug 24, 2023
@weihanglo
Copy link
Member Author

@bors r+ rollup=never p=9

@bors
Copy link
Contributor

bors commented Aug 24, 2023

📌 Commit eee76d9 has been approved by weihanglo

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 Aug 24, 2023
@bors
Copy link
Contributor

bors commented Aug 24, 2023

⌛ Testing commit eee76d9 with merge 33be53e61a875a3b978a850f1f83ed781fb53dc5...

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test result: ok. 1 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 0.15s


running 1 test
##[error]The runner has received a shutdown signal. This can happen when the runner service is stopped, or a manually started runner is canceled.
##[group]Clock drift check
  local time: Fri Aug 25 00:01:54 UTC 2023
  local time: Fri Aug 25 00:01:54 UTC 2023
Session terminated, killing shell... ...killed.
time="2023-08-25T00:01:55Z" level=error msg="error waiting for container: unexpected EOF"
##[error]The operation was canceled.
Cleaning up orphan processes

@bors
Copy link
Contributor

bors commented Aug 25, 2023

💔 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 Aug 25, 2023
@compiler-errors
Copy link
Member

Unrelated?

@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 Aug 25, 2023
@bors
Copy link
Contributor

bors commented Aug 25, 2023

⌛ Testing commit eee76d9 with merge c9228ae...

@bors
Copy link
Contributor

bors commented Aug 25, 2023

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing c9228ae to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 25, 2023
@bors bors merged commit c9228ae into rust-lang:master Aug 25, 2023
@rustbot rustbot added this to the 1.74.0 milestone Aug 25, 2023
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#114987 elaborate a bit on the (lack of) safety in 'Mmap::map' e7324149110250b398fdcd2709a33b2c7f3b25a2 (link)
#115084 Add smir predicates_of 69c023d77d87f7fdc7a50e6c5b1c22867249f199 (link)
#115117 Detect and report nix shell d7fe44668a5d1db35dd7a5c5aacbf487b9a9f7e4 (link)
#115124 kmc-solid: Import std::sync::PoisonError in `std::sys::so… 9e57a4c79b9ae5d3cdb0ee04ba0e0f540cd79a49 (link)
#115152 refactor(lint): translate RenamedOrRemovedLint bf63b2739b6bb30866cc46e4005fb540cbcbcf62 (link)
#115154 Move some ui tests to subdirectories b899540828ce88ff7bbd222b1886ceb6c97ecbe2 (link)
#115167 Fix ub-int-array test for big-endian platforms c6d3026a0ea44543bb109516fedf376cbe33a0cd (link)
#115172 Add more tests for if_let_guard 950a893a9e8958a80266ee3e368fd38c40bf3104 (link)
#115177 Add symbols for Clippy usage c63e40fb107c73d6c11520ffa794329c809a6eb4 (link)

previous master: c75b6bdb37

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c9228ae): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.4% [0.4%, 0.4%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.0% [2.0%, 2.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-6.2%, -1.0%] 8
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 629.758s -> 631.208s (0.23%)
Artifact size: 315.65 MiB -> 315.71 MiB (0.02%)

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 merged-by-bors This PR was explicitly merged by bors. O-solid Operating System: SOLID 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.