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 10 pull requests #132094

Merged
merged 25 commits into from
Oct 24, 2024
Merged

Rollup of 10 pull requests #132094

merged 25 commits into from
Oct 24, 2024

Conversation

Zalathar
Copy link
Contributor

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

madsmtm and others added 25 commits October 2, 2024 19:57
The `x86_64-pc-nto-qnx710` and `i586-pc-nto-qnx700` targets have `pc` in
their target triple names, but the vendor was set to the default
`"unknown"`.
- remove a redundant check, because we always emit the "better diagnostic" now
- clean up the comments a bit
As part of the "arbitrary self types v2" project, we are going to
replace the current `Receiver` trait with a new mechanism based on a
new, different `Receiver` trait.

This PR renames the old trait to get it out the way. Naming is hard.
Options considered included:
* HardCodedReceiver (because it should only be used for things in the
  standard library, and hence is sort-of hard coded)
* LegacyReceiver
* TargetLessReceiver
* OldReceiver

These are all bad names, but fortunately this will be temporary.
Assuming the new mechanism proceeds to stabilization as intended, the
legacy trait will be removed altogether.

Although we expect this trait to be used only in the standard library,
we suspect it may be in use elsehwere, so we're landing this change
separately to identify any surprising breakages.

It's known that this trait is used within the Rust for Linux project; a
patch is in progress to remove their dependency.

This is a part of the arbitrary self types v2 project,
rust-lang/rfcs#3519
rust-lang#44874

r? @wesleywiser
 double_parens
 filter_map_identity
 needless_question_mark
 redundant_guards
…esleywiser

Rename Receiver -> LegacyReceiver

As part of the "arbitrary self types v2" project, we are going to replace the current `Receiver` trait with a new mechanism based on a new, different `Receiver` trait.

This PR renames the old trait to get it out the way. Naming is hard. Options considered included:
* HardCodedReceiver (because it should only be used for things in the standard library, and hence is sort-of hard coded)
* LegacyReceiver
* TargetLessReceiver
* OldReceiver

These are all bad names, but fortunately this will be temporary. Assuming the new mechanism proceeds to stabilization as intended, the legacy trait will be removed altogether.

Although we expect this trait to be used only in the standard library, we suspect it may be in use elsehwere, so we're landing this change separately to identify any surprising breakages.

It's known that this trait is used within the Rust for Linux project; a patch is in progress to remove their dependency.

This is a part of the arbitrary self types v2 project,
rust-lang/rfcs#3519
rust-lang#44874

r? `@wesleywiser`
…wesleywiser

Fix `target_vendor` in QNX Neutrino targets

The `x86_64-pc-nto-qnx710` and `i586-pc-nto-qnx700` targets have `pc` in their target triple names, but the vendor was set to the default `"unknown"`.

CC target maintainers `@flba-eb,` `@gh-tr,` `@jonathanpallant` and `@japaric`
…ype-err, r=lcnr

Deeply normalize `TypeTrace` when reporting type error in new solver

Normalize the values that come from the `TypeTrace` for various type mismatches.

Side-note: We can't normalize the `TypeError` itself bc it may come from instantiated binders, so it may reference values from within the probe...

r? lcnr
…piler-errors

minor `*dyn` cast cleanup

Small follow-up to rust-lang#130234 to remove a redundant check and clean up comments. No functional changes.

Also, explain why casts cannot drop the principal even though coercions can, and add a test because apparently we didn't have one already.

r? `@WaffleLapkin` or `@compiler-errors`
…mpiler-errors

Prevent overflowing enum cast from ICEing

Fixes rust-lang#131902
…jieyouxu

Don't allow test revisions that conflict with built in cfgs

Fixes rust-lang#128964

Sorry `@heysujal` I started working on this about 1 minute before your comment by complete coincidence 😅
…-errors,Swatinem

coverage: Pass coverage mappings to LLVM as separate structs

Instead of trying to cram *N* different kinds of coverage mapping data into a single list for FFI, pass *N* different lists of simpler structs.

This avoids the need to fill unused fields with dummy values, and avoids the need to tag structs with their underlying kind. It also lets us call the dedicated LLVM constructors for each different mapping type, instead of having to go through the complex general-purpose constructor.

Even though this adds multiple new structs to the FFI surface area, the resulting C++ code is simpler and shorter.

---

I've structured this mostly as a single atomic patch, rather than a series of incremental changes, because that avoids the need to make fiddly fixes to code that is about to be deleted anyway.
…rcote,Mark-Simulacrum

HashStable for rustc_feature::Features: stop hashing compile-time constant

It seems like back in rust-lang@542bc75 this was added as "hash the boolean value of each lang feature", but then in rust-lang@1487bd6 this got split into first hashing a sequence of `bool`s (representing all the features) and then hashing all the feature names... but the list of feature names is a compile-time constant, so it seems entirely unnecessary to hash them?

Cc `@Mark-Simulacrum` who wrote the second of the commits mentioned above.
Cc `@nnethercote`
…ieyouxu

Print safety correctly in extern static items

Fixes rust-lang#132080

r? spastorino or anyone really
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc PG-exploit-mitigations Project group: Exploit mitigations labels Oct 24, 2024
@rustbot rustbot added 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. 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 (-Znext-solver) rollup A PR which is a rollup labels Oct 24, 2024
@Zalathar
Copy link
Contributor Author

@bors r+ rollup=never p=10

@bors
Copy link
Contributor

bors commented Oct 24, 2024

📌 Commit 7e2bbc3 has been approved by Zalathar

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

bors commented Oct 24, 2024

⌛ Testing commit 7e2bbc3 with merge 55b7f8e...

@bors
Copy link
Contributor

bors commented Oct 24, 2024

☀️ Test successful - checks-actions
Approved by: Zalathar
Pushing 55b7f8e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 24, 2024
@bors bors merged commit 55b7f8e into rust-lang:master Oct 24, 2024
7 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Oct 24, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#130225 Rename Receiver -> LegacyReceiver 2ddcce914b7c880e1239e5ae241bbdebbe96c2be (link)
#131169 Fix target_vendor in QNX Neutrino targets e1da772d4f8c76916a2d408ca3317b29b4dd9355 (link)
#131623 misc cleanups c930a3f5a857e5309e7b012ce0d6b494dd0e8672 (link)
#131756 Deeply normalize TypeTrace when reporting type error in n… cf9ebdc882962d90d7af3077716c73c0096c19b5 (link)
#131898 minor *dyn cast cleanup 5f29e0b334ff271a2f4b3e8856c1db70ac04e519 (link)
#131909 Prevent overflowing enum cast from ICEing f23700aed6c048ced27a914163f3a04cdd1d0a03 (link)
#131930 Don't allow test revisions that conflict with built in cfgs 6bd35a3e737722b4b0faf4ede42a74664e337099 (link)
#131956 coverage: Pass coverage mappings to LLVM as separate structs cd40b1551b1d43ccee11da105cc6ef38a7f60713 (link)
#132076 HashStable for rustc_feature::Features: stop hashing compil… 5c6183f86f866a3c4a2d0edf56062445b93f023d (link)
#132088 Print safety correctly in extern static items e35e67451282b3b92f26055c4c4146e446656189 (link)

previous master: b8bb2968ce

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 (55b7f8e): comparison URL.

Overall result: ❌ regressions - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

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

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.2% [0.1%, 0.2%] 4
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [0.1%, 0.2%] 4

Max RSS (memory usage)

Results (secondary -3.2%)

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
Improvements ✅
(secondary)
-3.2% [-3.8%, -2.1%] 3
All ❌✅ (primary) - - 0

Cycles

Results (primary -0.9%, secondary -0.3%)

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)
1.1% [1.1%, 1.1%] 1
Improvements ✅
(primary)
-0.9% [-1.1%, -0.7%] 16
Improvements ✅
(secondary)
-0.9% [-1.2%, -0.7%] 2
All ❌✅ (primary) -0.9% [-1.1%, -0.7%] 16

Binary size

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

Bootstrap: 785.689s -> 780.14s (-0.71%)
Artifact size: 333.63 MiB -> 333.62 MiB (-0.00%)

@rustbot rustbot added the perf-regression Performance regression. label Oct 24, 2024
@Zalathar
Copy link
Contributor Author

I'm not very familiar with perf results, but reducing one family of benchmarks by 0.2% looks like noise to me.

@Kobzol
Copy link
Contributor

Kobzol commented Oct 29, 2024

The tiny regressions to syn were reverted soon after.

image

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. PG-exploit-mitigations Project group: Exploit mitigations 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. 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 (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.