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 14 pull requests #137651

Merged
merged 33 commits into from
Feb 26, 2025
Merged

Rollup of 14 pull requests #137651

merged 33 commits into from
Feb 26, 2025

Conversation

fmease
Copy link
Member

@fmease fmease commented Feb 26, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

thaliaarchi and others added 30 commits February 19, 2025 18:43
It seems as if `f16` works on MIPS now according to my
testing on Rust master with LLVM 20, and I was asked to
create PRs with my changes.

I only tested on the flavour of `mipsel-unknown-linux-gnu`
hardware that happens to be available to me, so I can't say
anything about other MIPS hardware, but from a casual
skimming of the LLVM code ([1], [2]) it seems like `f16`
should work on all MIPS hardware. So enable it for all MIPS
hardware.

[1]: https://github.com/rust-lang/llvm-project/blob/rustc/20.1-2025-02-13/llvm/lib/Target/Mips/MipsISelLowering.h#L370
[2]: https://github.com/rust-lang/llvm-project/blob/rustc/20.1-2025-02-13/llvm/lib/CodeGen/TargetLoweringBase.cpp#L1367-L1388
The implementation of the `type_has_metadata` function is duplicated in
`rustc_codegen_ssa` and `rustc_monomorphize`, so move this to
`rustc_middle`.
`rustc_codegen_llvm` relied on `Deref` impls where `Deref::Target` was
or contained an extern type - in my experimental implementation of
rust-lang/rfcs#3729, this isn't possible as the `Target` associated
type's `?Sized` bound cannot be relaxed backwards compatibly (unless we
come up with some way of doing this).

In later pull requests with the rust-lang/rfcs#3729 implementation,
breakage like this could only occur for nightly users relying on the
`extern_types` feature.

Upstreaming this to avoid needing to keep carrying this patch locally,
and I think it'll necessarily need to change eventually.
In the standard library, the `Extend` impl for `Iterator` (specialised
with `TrustedLen`) has a parameter which is constrained by a projection
predicate. This projection predicate provides a value for an inference
variable but host effect evaluation wasn't resolving variables first.

Adding the extra resolve can the number of errors in some tests when they
gain host effect predicates, but this is not unexpected as calls to
`resolve_vars_if_possible` can cause more error tainting to happen.

Co-authored-by: Boxy <[email protected]>
Added to demonstrate change in output in following commit. Many more
interesting tests change with different output, missing errors, new
errors, etc related to this but they all depend on feature flags and
are much more complex than this.
Like trait predicates, the self type ought to be skipped here.
these were ignored because of rust-lang#45351, but that issue has long been fixed. Let's see if these pass, or if there is some issue lurking still
pass optimization level to llvm-bitcode-linker

optimization level is not passed to llbc, which should be a mistake
…isDenton

Add UTF-8 validation fast paths in `Wtf8Buf`

This adds two more fast paths for UTF-8 validation in `Wtf8Buf`, making use of the `is_known_utf8` flag added in rust-lang#96869 (Optimize `Wtf8Buf::into_string` for the case where it contains UTF-8).

r? `@ChrisDenton`
Enable `f16` for MIPS

Blocked on rust-lang/compiler-builtins#762

It seems as if `f16` works on MIPS now according to my testing on Rust master with LLVM 20, and I was asked [here](rust-lang#137167 (comment)) to create PRs with my changes.

I only tested on the flavour of `mipsel-unknown-linux-gnu` hardware that happens to be available to me, so I can't say anything about other MIPS hardware, but from a casual skimming of the LLVM code ([1], [2]) it seems like `f16` should work on all MIPS hardware. So enable it for all MIPS hardware.

[1]: https://github.com/rust-lang/llvm-project/blob/rustc/20.1-2025-02-13/llvm/lib/Target/Mips/MipsISelLowering.h#L370
[2]: https://github.com/rust-lang/llvm-project/blob/rustc/20.1-2025-02-13/llvm/lib/CodeGen/TargetLoweringBase.cpp#L1367-L1388

`@rustbot` label +O-MIPS +F-f16_and_f128 +S-blocked

Tracking issue for f16: rust-lang#116909

r? `@tgross35`
…ility, r=notriddle

fix(rustdoc): Fixed stability version in rustdoc

Tries to fix rust-lang#137141
Fixed by adding checks glob exports
tests: Add regression test for derive token invalidation (rust-lang#81099)

Closes rust-lang#81099.
…ts, r=fmease

run some tests on emscripten again

these were ignored because of rust-lang#45351, but that issue has long been fixed. Let's see if these pass, or if there is some issue lurking still

I believe this is the try-job for emscripten? probably a good idea to run that first.

~~try-job: test-various~~
try-job: dist-various-1
…adata, r=fmease,bjorn3

ssa/mono: deduplicate `type_has_metadata`

The implementation of the `type_has_metadata` function is duplicated in `rustc_codegen_ssa` and `rustc_monomorphize`, so move this to `rustc_middle`.
…=lcnr

codegen_llvm: avoid `Deref` impls w/ extern type

`rustc_codegen_llvm` relied on `Deref` impls where `Deref::Target` was or contained an extern type - in my experimental implementation of rust-lang/rfcs#3729, this isn't possible as the `Target` associated type's `?Sized` bound cannot be relaxed backwards compatibly (unless we come up with some way of doing this).

In later pull requests with the rust-lang/rfcs#3729 implementation, breakage like this could only occur for nightly users relying on the `extern_types` feature.

Upstreaming this to avoid needing to keep carrying this patch locally, and I think it'll necessarily need to change eventually.
…, r=compiler-errors

trait_sel: resolve vars in host effects

In the standard library, the `Extend` impl for `Iterator` (specialised with `TrustedLen`) has a parameter which is constrained by a projection predicate. This projection predicate provides a value for an inference variable but - if the default bound is `const Sized` instead of `Sized` - host effect evaluation wasn't resolving variables first. Added a test that doesn't depend on a rust-lang/rfcs#3729 implementation.

Adding the extra resolve can the number of errors in some tests when they gain host effect predicates, but this is not unexpected as calls to `resolve_vars_if_possible` can cause more error tainting to happen.
Complete the list of resources used in rustdoc output

The Nanum Barun Gothic Font was missing in the list and should clearly be mentionned.

Arguably referencing the Rust logos is not really necessary as the file mentions "third party resources" but it doesn't hurt and should make things clearer for anybody who wants to publish their Rust doc.
…r=compiler-errors

hir_analysis: skip self type of host effect preds in variances_of

Discovered as part of an implementation of rust-lang/rfcs#3729 - w/out this then when introducing const trait bounds: many more interesting tests change with different output, missing errors, new errors, etc related to this but they all depend on feature flags and are much more complex than this test.

r? ``@oli-obk``
…r-errors

fix attribute-related ICE when parsing macro on the rhs of a name-value attribute

r? ``@oli-obk``

Closes: rust-lang#137589
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. rollup A PR which is a rollup labels Feb 26, 2025
@fmease
Copy link
Member Author

fmease commented Feb 26, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Feb 26, 2025

📌 Commit 1bb4319 has been approved by fmease

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 Feb 26, 2025
@bors
Copy link
Contributor

bors commented Feb 26, 2025

⌛ Testing commit 1bb4319 with merge 2b3cef882aa9085db417837ac6152463060f1f8a...

@bors
Copy link
Contributor

bors commented Feb 26, 2025

☀️ Test successful - checks-actions
Approved by: fmease
Pushing 2b3cef8 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 26, 2025
@bors bors merged commit 2b3cef8 into rust-lang:master Feb 26, 2025
7 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Feb 26, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#136576 pass optimization level to llvm-bitcode-linker 900e08063431528948147c26cd52b9fbc5ab6467 (link)
#137154 Add UTF-8 validation fast paths in Wtf8Buf d59558c2917a5596238369769983f46872f4a415 (link)
#137311 Enable f16 for MIPS 22119575a6d22f8c7df292c8ddc179ae027bfcbb (link)
#137320 fix(rustdoc): Fixed stability version in rustdoc 9d4a69988b3fed0a440a16c947c2217b30f95966 (link)
#137529 remove few unused args 3c1a5610d3dd4c71f589f32df1ef1b303ce6c6ee (link)
#137544 tests: Add regression test for derive token invalidation (#… 41f85479ea862ba27e41dce5b503a68d6fec9361 (link)
#137559 run some tests on emscripten again 4a11057a1b8e2bcae993614ca42aab3a1c50de0f (link)
#137601 ssa/mono: deduplicate type_has_metadata 5c9f4392ee7a88b42b9d7d91ce86899c34cc9a29 (link)
#137603 codegen_llvm: avoid Deref impls w/ extern type 3bc095f50f48f1de72993a8189e9e6837537887b (link)
#137604 trait_sel: resolve vars in host effects 9db327f401771bfe000acc07e92ac6cc3e69671f (link)
#137609 Complete the list of resources used in rustdoc output 5466408b729483d0f239416e704cd1e7524f582e (link)
#137613 hir_analysis: skip self type of host effect preds in varian… cba475b3e5bee36055d122048941b77d0a0f0fae (link)
#137614 fix doc in library/core/src/pin.rs 96bedfaf6fe43443a03b0882a62744ecd6e3c19b (link)
#137622 fix attribute-related ICE when parsing macro on the rhs of … fb4c2e5af71f304cef503c3008579e983bd2d232 (link)

previous master: a46c755c6a

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

@fmease fmease deleted the rollup-s3s7m6f branch February 26, 2025 11:37
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2b3cef8): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

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

Cycles

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

Binary size

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

Bootstrap: 771.663s -> 771.091s (-0.07%)
Artifact size: 361.93 MiB -> 361.99 MiB (0.02%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) 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-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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.