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 8 pull requests #127403

Merged
merged 18 commits into from
Jul 6, 2024
Merged

Conversation

compiler-errors
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Urgau and others added 18 commits July 1, 2024 23:03
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
…olnay

impl PathBuf::add_extension and Path::with_added_extension

See the ACP for motivation and discussions - rust-lang/libs-team#368
…=pnkfelix

Improve dead code analysis

Fixes rust-lang#120770

1. check impl items later if self ty is private although the trait method is public, cause we must use the ty firstly if it's private
2. mark the adt live if it appears in pattern, like generic argument, this implies the use of the adt
3. based on the above, we can handle the case that private adts impl Default, so that we don't need adding rustc_trivial_field_reads on Default, and the logic in should_ignore_item

r? ``@pnkfelix``
Improve well known value check-cfg diagnostic for the standard library

This PR adjust the current logic for hidding the rustc/Cargo suggestion to add a value to a well-known name to exclude the standard library and rustc crates.

This is done in order to improve the contributor experience, in particular when adding a new target, which often requires adding some cfgs like `target_os` which may not be available yet in stage0.

<details>

The diagnostic code would look like this.

```text
error: unexpected `cfg` condition value: `blable`
   --> library/core/src/lib.rs:369:7
    |
369 | #[cfg(target_os = "blable")]
    |       ^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `target_os` are: `aix`, `android`, `cuda`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `macos`, `netbsd`, `none`, `nto`, `openbsd`, `psp`, `redox`, `solaris`, `solid_asp3`, `teeos`, `tvos`, `uefi`, `unknown`, `visionos`, `vita`, `vxworks`, `wasi`, `watchos`, and `windows` and 2 more
    = help: consider using a Cargo feature instead
    = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
             [lints.rust]
             unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("blable"))'] }
    = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(target_os, values(\"blable\"))");` to the top of the `build.rs`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
    = note: `-D unexpected-cfgs` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(unexpected_cfgs)]`
```

</details>
…ain, r=lcnr

Split `SolverDelegate` back out from `InferCtxtLike`

This is because in order to uplift things like the `Generalizer` and other `TypeRelation`s, we want to be able to interface with `InferCtxtLike` (and `InferCtxt` as its implementation), rather that `SolverDelegate`, which only really exists as a hack to be able to define some downstream methods in `rustc_type_ir`.

r? lcnr
…adability, r=Amanieu

Improve readability of some fmt code examples

Some indent was weird. Some examples were too long (overall better to keep it to maximum 80 columns, but only changed the most outstanding ones).

r? ```@Amanieu```
…r-errors

Use `ControlFlow` results for visitors that are only looking for a single value

These visitors all had a `Option<Value>` or `bool` field, that, once set, was never unset or modified again. They have been refactored by removing the field and returning `ControlFlow` directly from the visitor
Added dots at the sentence ends of rustc AST doc

Just a tiny improvement for the AST documentation by bringing consistency to sentence ends. I intentionally didn't terminate every sentence, there are still some members not having them, but at least there's no mixing style on the type level.
Remove clubby789 from review rotation

These days I'm unfortunately too busy to be able to take up reviews, and it looks like some PRs have been blocked on this 😓
@rustbot rustbot added A-meta Area: Issues about the rust-lang/rust repository. 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative rollup A PR which is a rollup labels Jul 6, 2024
@compiler-errors
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Jul 6, 2024

📌 Commit b73a790 has been approved by compiler-errors

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

bors commented Jul 6, 2024

⌛ Testing commit b73a790 with merge 51917e2...

@bors
Copy link
Contributor

bors commented Jul 6, 2024

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing 51917e2 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 6, 2024
@bors bors merged commit 51917e2 into rust-lang:master Jul 6, 2024
7 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jul 6, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#123600 impl PathBuf::add_extension and Path::with_added_extension d2d1cb0296cf8aa4bfa09f9b2daa04ffe8b18951 (link)
#127107 Improve dead code analysis d0932e63fa0b5d116c6cf6ce728d395cf47f5763 (link)
#127221 Improve well known value check-cfg diagnostic for the stand… 9a9ad65e4a254f38c887545820731df6e916a8d2 (link)
#127333 Split SolverDelegate back out from InferCtxtLike 47e9b97b4f69f1ae64efcd150c8adb061658ccc5 (link)
#127363 Improve readability of some fmt code examples 1c4d4e768f60f24a92c249ccf0d6e2c1616e4e69 (link)
#127366 Use ControlFlow results for visitors that are only lookin… d9511837445a90bec9790cab13718b9726a0c5ee (link)
#127368 Added dots at the sentence ends of rustc AST doc 67cdb81e32d52e11ef394b90c8da08383f683fc9 (link)
#127393 Remove clubby789 from review rotation a5bb62b49ca56308c0234bcbef609c3db0966a89 (link)

previous master: 5c08cc765a

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 (51917e2): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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.2% [0.2%, 0.3%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.9% [-1.3%, -0.6%] 9
All ❌✅ (primary) 0.2% [0.2%, 0.3%] 3

Max RSS (memory usage)

Results (primary -0.6%, secondary -0.8%)

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)
- - 0
Improvements ✅
(primary)
-0.6% [-0.6%, -0.6%] 1
Improvements ✅
(secondary)
-0.8% [-1.1%, -0.4%] 3
All ❌✅ (primary) -0.6% [-0.6%, -0.6%] 1

Cycles

Results (secondary 3.0%)

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)
3.5% [0.5%, 5.3%] 9
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.5% [-1.5%, -1.5%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 698.837s -> 697.532s (-0.19%)
Artifact size: 328.25 MiB -> 328.20 MiB (-0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Jul 6, 2024
@Kobzol
Copy link
Contributor

Kobzol commented Jul 9, 2024

The regression is only in a single benchmark, and only in incr-unchanged. At the same time, the derive benchmark has been nicely improved. I don't think that this warrants further investigation.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues about the rust-lang/rust repository. merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. 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-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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.