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

Merged
merged 29 commits into from
Apr 10, 2024
Merged

Rollup of 7 pull requests #123725

merged 29 commits into from
Apr 10, 2024

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

celinval and others added 29 commits April 8, 2024 17:07
Before this fix, the call to `body()` would crash, since `has_body()`
would return true, but we would try to retrieve the body of an intrinsic
which is not allowed.

Instead, the `Instance::body()` function will now convert an Intrinsic
into an Item before retrieving its body.
`wide_str!` creates a null terminated UTF-16 string whereas `utf16!` just creates a UTF-16 string without adding a null.
This commit does three things:
 1. replaces (the last remaining) never true cfgs by the FALSE cfg
 2. fix derive-helper-configured.rs (typo in directive)
 3. and comment some current unused #[cfg_attr] (missing revisions)
This cuts the HTML overhead for a page by about 1KiB,
significantly reducing the overall size of the docs bundle.
According to <https://caniuse.com/?search=svg%20favicon>,
SVG favicons are supported in everything but Safari.

When I actually try it in Safari, it's downloading all
three favicons, and nothing looks different when I disable
the 16x16 one.

<https://dev.to/masakudamatsu/favicon-nightmare-how-to-maintain-sanity-3al7>,
which is linked from caniuse above, recommends an ico.
However, the reason they recommend it is the apps that
only support /favicon.ico exactly, and rustdoc can't assume
it will be installed to the site root, so it's unfortunately
up to the webmaster to make sure it's set up.
Add `REDUNDANT_LIFETIMES` lint to detect lifetimes which are semantically redundant

There already is a `UNUSED_LIFETIMES` lint which is fired when we detect where clause bounds like `where 'a: 'static`, however, it doesn't use the full power of lexical region resolution to detect failures.

Right now `UNUSED_LIFETIMES` is an `Allow` lint, though presumably we could bump it to warn? I can (somewhat) easily implement a structured suggestion so this can be rustfix'd automatically, since we can just walk through the HIR body, replacing instances of the redundant lifetime.

Fixes rust-lang#118376
r? lcnr
Windows: set main thread name without re-encoding

As a minor optimization, we can skip the runtime UTF-8 to UTF-16 conversion.
…-obk

Add support to intrinsics fallback body

Before this fix, the call to `body()` would crash, since `has_body()` would return true, but we would try to retrieve the body of an intrinsic which is not allowed.

Instead, the `Instance::body()` function will now convert an Intrinsic into an Item before retrieving its body.

Note: I also changed how we monomorphize the instance body. Unfortunately, the call still ICE for some shims.

r? `@oli-obk`
…erics, r=oli-obk

Add const generics support for pattern types

r? `@oli-obk`
…checking, r=WaffleLapkin

Only assert for child/parent projection compatibility AFTER checking that theyre coming from the same place

This assertion doesn't make sense until we check that these captures are actually equivalent.

Fixes rust-lang#123697

<sub>Some days I wonder how I even write code that works...</sub>
…eck-cfg-2, r=jieyouxu

Further cleanup cfgs in the UI test suite

This PR does more cleanup of cfgs in our UI test suite, in preparation for adding automatic always on check-cfg (but is IMO worth landing even without that follow up).

To be more specific this PR:
 - replaces (the last remaining) never true cfgs by the `FALSE` cfg
 - fix `proc-macro/derive-helper-configured.rs` *(typo in directive)*
 - and comment some current unused `#[cfg_attr]` *(missing revisions)*

Follow-up to rust-lang#123577.
…r=GuillaumeGomez

rustdoc: reduce per-page HTML overhead

r? `@GuillaumeGomez`
@rustbot rustbot added the O-windows Operating system: Windows label Apr 10, 2024
@rustbot rustbot added 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. rollup A PR which is a rollup labels Apr 10, 2024
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=5 rollup=never

@bors
Copy link
Contributor

bors commented Apr 10, 2024

📌 Commit 96628f4 has been approved by GuillaumeGomez

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

bors commented Apr 10, 2024

⌛ Testing commit 96628f4 with merge 5974fe8...

@bors
Copy link
Contributor

bors commented Apr 10, 2024

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 5974fe8 to master...

1 similar comment
@bors
Copy link
Contributor

bors commented Apr 10, 2024

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 5974fe8 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 10, 2024
@bors bors merged commit 5974fe8 into rust-lang:master Apr 10, 2024
12 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Apr 10, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#118391 Add REDUNDANT_LIFETIMES lint to detect lifetimes which ar… fc1fbd71580f22f62861d5f1400c3afec12a845b (link)
#123534 Windows: set main thread name without re-encoding 585f0e718f00dd021b53ab608df79ce1def94b56 (link)
#123659 Add support to intrinsics fallback body 8260255d65feae6c36fca696a96e81c4d40eb123 (link)
#123689 Add const generics support for pattern types e026c18bc47b56820e6a46605d3be206538e90dc (link)
#123701 Only assert for child/parent projection compatibility AFTER… 8e43695bd471980baa9435a5fa7f61d00e8383cb (link)
#123702 Further cleanup cfgs in the UI test suite 010b52de3bb0ce874f045c6d2d1c35bd52f198c3 (link)
#123706 rustdoc: reduce per-page HTML overhead 8843443cb17b69da0ce9784b77b3105dd6b29cb9 (link)

previous master: e908cfd125

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 (5974fe8): 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.2%] 2
Regressions ❌
(secondary)
0.9% [0.2%, 2.6%] 7
Improvements ✅
(primary)
-0.4% [-0.6%, -0.2%] 2
Improvements ✅
(secondary)
-0.6% [-0.6%, -0.6%] 1
All ❌✅ (primary) -0.1% [-0.6%, 0.2%] 4

Max RSS (memory usage)

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

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

Binary size

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

Bootstrap: 672.464s -> 675.526s (0.46%)
Artifact size: 318.41 MiB -> 318.49 MiB (0.03%)

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

Kobzol commented Apr 16, 2024

The two largest regressions were noise. The rest is small enough that I don't think we need to delve into this further.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. O-windows Operating system: Windows 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. 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.