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

Merged
merged 17 commits into from
Jul 13, 2023
Merged

Rollup of 7 pull requests #113646

merged 17 commits into from
Jul 13, 2023

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

compiler-errors and others added 17 commits July 8, 2023 03:41
The x.py script fails with `ValueError: too many values to unpack (expected 3)` when uname -smp gives more than 3 words
Implement selection for `Unsize` for better coercion behavior

In order for much of coercion to succeed, we need to be able to deal with partial ambiguity of `Unsize` traits during selection. However, I pessimistically implemented selection in the new trait solver to just bail out with ambiguity if it was a built-in impl:
https://github.com/rust-lang/rust/blob/9227ff28aff55b252314076fcf21c9a66f10ac1e/compiler/rustc_trait_selection/src/solve/eval_ctxt/select.rs#L126

This implements a proper "rematch" procedure for dealing with built-in `Unsize` goals, so that even if the goal is ambiguous, we are able to get nested obligations which are used in the coercion selection-like loop:
https://github.com/rust-lang/rust/blob/9227ff28aff55b252314076fcf21c9a66f10ac1e/compiler/rustc_hir_typeck/src/coercion.rs#L702

Second commit just moves a `resolve_vars_if_possible` call to fix a bug where we weren't detecting a trait upcasting to occur.

r? ``@lcnr``
Make Placeholder, GeneratorWitness*, Infer and Error unreachable on SMIR rustc_ty_to_ty

Let's remove these todos to not confuse ``@ericmarkmartin`` if they pick some conversion up.

r? ``@oli-obk``
Update cargo

10 commits in 45782b6b8afd1da042d45c2daeec9c0744f72cc7..694a579566a9a1482b20aff8a68f0e4edd99bd28
2023-07-05 16:54:51 +0000 to 2023-07-11 22:28:29 +0000
- fix(embedded): Always generate valid package names (rust-lang/cargo#12349)
- fix(embedded): Error on unsupported commands (rust-lang/cargo#12350)
- chore(ci): Automatically test new packages by using `--workspace` (rust-lang/cargo#12342)
- contrib docs: Add some more detail about how publishing works (rust-lang/cargo#12344)
- docs: Put cargo-add change under nightly (rust-lang/cargo#12343)
- Minor: Use "number" instead of "digit" when explaining Cargo's use of semver (rust-lang/cargo#12340)
- Update criterion (rust-lang/cargo#12338)
- Add profile strip to config docs. (rust-lang/cargo#12337)
- update re: multiple versions that differ only in the metadata tag (rust-lang/cargo#12335)
- doc: state `PackageId`/`SourceId` string is opaque (rust-lang/cargo#12313)

r? ``@ghost``
…li-obk

Test simd-wide-sum for codegen error

This adds the necessary test infrastructure to "build-pass" codegen tests, for the purpose of doing that for a single revision of a codegen test. When mir-opts are tested, the output may vary from the usual, and maybe for positive reasons... but we don't necessarily want to output such bad LLVMIR that LLVM starts crashing on it.

Currently when enabling MIR opts at higher levels this LLVMIR is still emitted, but it was previously disabled for getting in mir-opt's way and as this new revision without `// [mir-opt3]build-pass` would make it more likely to, I would like to not see the testing for the actual results regress again just because it was bundled with an ICE check as well.

This fixes rust-lang#98016
…name, r=notriddle

Allow to have `-` in rustdoc-json test file name

I extracted this commit from rust-lang#113574.

When I added the test, it kept saying that the JSON file couldn't be found. After investigating for a while, I discovered that we were expecting files to always use `_`, which is quite bad. So I added support for `-` in file names.

r? ``@notriddle``
Fix bootstrap.py uname error

The x.py script fails with `ValueError: too many values to unpack (expected 3)` when uname -smp gives more than 3 words

The error I got:
```
❯ ./x check
Traceback (most recent call last):
  File "/data1/edgar/rust/x.py", line 50, in <module>
    bootstrap.main()
  File "/data1/edgar/rust/src/bootstrap/bootstrap.py", line 1113, in main
    bootstrap(args)
  File "/data1/edgar/rust/src/bootstrap/bootstrap.py", line 1070, in bootstrap
    build = RustBuild(config_toml, args)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data1/edgar/rust/src/bootstrap/bootstrap.py", line 505, in __init__
    self.build = args.build or self.build_triple()
                               ^^^^^^^^^^^^^^^^^^^
  File "/data1/edgar/rust/src/bootstrap/bootstrap.py", line 976, in build_triple
    return config or default_build_triple(self.verbose)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data1/edgar/rust/src/bootstrap/bootstrap.py", line 259, in default_build_triple
    kernel, cputype, processor = uname.decode(default_encoding).split()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 3)
```

This is because

```
❯ uname -smp
Linux x86_64 AMD Ryzen 7 5800X 8-Core Processor
```
Returns more than 3 space separated words.
@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend 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. 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative rollup A PR which is a rollup labels Jul 13, 2023
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Jul 13, 2023

📌 Commit 7ea4387 has been approved by matthiaskrgr

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 Jul 13, 2023
@Dylan-DPC
Copy link
Member

Dylan-DPC commented Jul 13, 2023

@bors retry [ this was supposed to run but wasn't picked up]

edit: that didn't work hmm

@bors
Copy link
Contributor

bors commented Jul 13, 2023

⌛ Testing commit 7ea4387 with merge 1b3e686...

@bors
Copy link
Contributor

bors commented Jul 13, 2023

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 1b3e686 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 13, 2023
@bors bors merged commit 1b3e686 into rust-lang:master Jul 13, 2023
11 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Jul 13, 2023
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#113353 Implement selection for Unsize for better coercion behavi… 7e84eb9a6fcf31577e5ffc8518d6fa452b6e0dec (link)
#113553 Make Placeholder, GeneratorWitness*, Infer and Error unreac… 2c4e7722391b339e04755b8606be4a16a4513566 (link)
#113598 Update cargo 5ff9f3f3a622cd22448aea3757faa5124ebfa407 (link)
#113603 Test simd-wide-sum for codegen error 825a355a8db0e7a48d1a9944ae708df7e98ff2c5 (link)
#113613 Allow to have - in rustdoc-json test file name 234057f27cc48e5b53a9be2cf528e5bb603fd381 (link)
#113615 llvm-wrapper: adapt for LLVM API change 5b6db77b20d828ca3e6192f590bf390b952e38e0 (link)
#113616 Fix bootstrap.py uname error e9d8f5d4da2fc6a7c7ee9adfd5546c2a172232d3 (link)

previous master: 33a2c2487a

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 (1b3e686): 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)
1.4% [0.7%, 2.2%] 7
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)
4.0% [2.1%, 6.1%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.0% [-7.1%, -2.5%] 4
All ❌✅ (primary) - - 0

Cycles

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)
4.0% [2.9%, 5.1%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 658.224s -> 658.375s (0.02%)

@matthiaskrgr matthiaskrgr deleted the rollup-1q6tmow branch March 16, 2024 18:18
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 A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.