Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Rollup of 13 pull requests #136613

Merged
merged 30 commits into from
Feb 6, 2025
Merged

Conversation

workingjubilee
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

bjorn3 and others added 30 commits January 26, 2025 14:14
This method will be removed in the future as it produces a broken ABI
that depends on cg_llvm implementation details. After this PR
wasm32-unknown-unknown is the only remaining user of
make_direct_deprecated().
…ched parameters when showing the definition.
These were detected by temporarily making `mod llvm` non-public.
We have four macros for generating trivial traversal (fold/visit) and
lift impls.
- `rustc_ir::TrivialTypeTraversalImpls`
- `rustc_middle::TrivialTypeTraversalImpls`
- `rustc_middle::TrivialLiftImpls`
- `rustc_middle::TrivialTypeTraversalAndLiftImpls`

The first two are very similar. The last one just combines the second
and third one.

The macros themselves are ok, but their use is a mess. This commit does
the following.
- Removes types that no longer need a lift and/or traversal impl from
  the macro calls.
- Consolidates the macro calls into the smallest number of calls
  possible, with each one mentioning as many types as possible.
- Orders the types within those macro calls alphabetically, and makes
  the module qualification more consistent.
- Eliminates `rustc_middle::mir::type_foldable`, because the macro calls
  were merged and the manual `TypeFoldable` impls are better placed in
  `structural_impls.rs`, alongside all the other ones.

This makes the code more concise. Moving forward, it also makes it more
obvious where new types should be added.
This has been bugging me for some time.
…ywiser

Avoid using make_direct_deprecated() in extern "ptx-kernel"

This method will be removed in the future as it produces a broken ABI that depends on cg_llvm implementation details. After this PR wasm32-unknown-unknown is the only remaining user of make_direct_deprecated().

Fixes rust-lang#117271
Blocks rust-lang#38788
Pass spans around new solver

...so that when we instantiate canonical responses, we can actually have region obligations with the right span.

Within the solver itself, we still use dummy spans everywhere.
… r=oli-obk

Fix `rustc_hidden_type_of_opaques` for RPITITs with no default body

Needed this when debugging something
…ouxu

Document minimum supported host tooling on macOS

In particular we support macOS 10.12 (same as for binaries produced by `rustc`) and Xcode 9.2 (the highest Xcode version that runs on macOS 10.12.6). I have this installed on a MacBook Pro from 2013 that sits below my desk, and am occasionally testing it.

I am documenting this now because it was unclear in rust-lang#136523.

(I'm not inherently against bumping these one day, but that's a separate discussion, let's at least document what we support right now).

`@rustbot` label O-macos
Clean up `Trivial*Impls` macros

They're currently quite messy. Details in the individual commit logs.

r? `@lcnr`
…type-reason, r=compiler-errors

Document why some "type mismatches" exist

Just something I stumbled over and thought to save myself (and maybe others) the research time when encountering it again.
Only highlight unmatchable parameters at the definition site

Followup to rust-lang#136497

This generally results more focused messages in the same vein as rust-lang#99635 (see `test/ui/argument-suggestions/complex.rs`). There are still some cases (e.g. `test/ui/argument-suggestions/permuted_arguments.rs`) where it might be worth highlighting the arguments. This is mitigated by the fact that a suggestion with a suggested rearrangement is given.

r? `@compiler-errors`
…=notriddle

Update browser-ui-test version to `0.20.2`

r? `@notriddle`
… r=compiler-errors

Implement RustcInternal for RawPtrKind

Implement `RustcInternal` for `RawPtrKind`. rust-lang#135748 introduced a `Stable` implementation [here](https://github.com/rust-lang/rust/pull/135748/files#diff-60f5e8edf69e04e89ef0c7f576363a91fa141e1db969484cef00063ed39c62e4R235).
…rgau

Add `rustc_hir_pretty::expr_to_string` function

It'll allow me to work on a new rustdoc feature. :)

r? `@Urgau`
…, r=Noratrieb

Fix `unreachable_pub` lint for hermit target

The build for the hermit target (`#[cfg(target_os = "hermit")]`) fails on master as of [8df89d1](rust-lang@8df89d1) (2025-02-05), due to introducing `#[warn(unreachable_pub)]` at the root in rust-lang#134286 (Enable unreachable_pub lint in core, merged 2025-01-20).

Make the relevant visibility modifiers more specific to resolve the warning.

```
$ ./x build --target x86_64-unknown-hermit
Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.34s
Building stage0 library artifacts (x86_64-apple-darwin)
    Finished `release` profile [optimized] target(s) in 0.15s
Building compiler artifacts (stage0 -> stage1, x86_64-apple-darwin)
    Finished `release` profile [optimized] target(s) in 1.67s
Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`)
Building stage1 library artifacts {alloc, core, panic_abort, panic_unwind, proc_macro, std, sysroot, test, unwind} (x86_64-apple-darwin -> x86_64-unknown-hermit)
   Compiling panic_unwind v0.0.0 (library/panic_unwind)
error: unreachable `pub` item
  --> library/panic_unwind/src/hermit.rs:10:9
   |
10 |         pub fn __rust_abort() -> !;
   |         ---^^^^^^^^^^^^^^^^^^^^^^^^
   |         |
   |         help: consider restricting its visibility: `pub(crate)`
   |
   = help: or consider exporting it for use by other crates
   = note: `-D unreachable-pub` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unreachable_pub)]`

error: unreachable `pub` item
  --> library/panic_unwind/src/hermit.rs:17:9
   |
17 |         pub fn __rust_abort() -> !;
   |         ---^^^^^^^^^^^^^^^^^^^^^^^^
   |         |
   |         help: consider restricting its visibility: `pub(crate)`
   |
   = help: or consider exporting it for use by other crates

error: could not compile `panic_unwind` (lib) due to 2 previous errors
Build completed unsuccessfully in 0:00:39
```
…gjubilee

cg_llvm: Remove the `mod llvm_` hack, which should no longer be necessary

This re-export was introduced in rust-lang@c76fc3d, as a workaround for rust-lang#53912.

In short, there was/is an assumption in some LLVM LTO code that symbol names would not contain `.llvm.`, but legacy symbol mangling would naturally produce that sequence for symbols in a module named `llvm`.

This was later “fixed” by adding a special case to the legacy symbol mangler in rust-lang#61195, which detects the sequence `llvm` and emits the `m` in an escaped form. As a result, there should no longer be any need to avoid the module name `llvm` in the compiler itself.

(Symbol mangling v0 avoids this problem by not using `.` in the first place, outside of the “vendor-specific suffix”.)
@rustbot rustbot added 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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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 Feb 6, 2025
@workingjubilee
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Feb 6, 2025

📌 Commit c549268 has been approved by workingjubilee

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

bors commented Feb 6, 2025

⌛ Testing commit c549268 with merge 5958825...

@bors
Copy link
Contributor

bors commented Feb 6, 2025

☀️ Test successful - checks-actions
Approved by: workingjubilee
Pushing 5958825 to master...

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#133932 Avoid using make_direct_deprecated() in extern "ptx-kernel" c90d5356458c2709898657d51c784f3fd3fc467c (link)
#136269 Pass spans around new solver 322d5eab3d1b21afaa22a4d72e77e3b45d59cccb (link)
#136550 Fix rustc_hidden_type_of_opaques for RPITITs with no defa… 6576df2bd596a16c2e686218f486938072fe1e98 (link)
#136558 Document minimum supported host tooling on macOS ba85a9db5123ebd6faded8dec2a678775c9a2f9f (link)
#136563 Clean up Trivial*Impls macros b692329106a363f583ed8bad22709ab67a37fff7 (link)
#136566 Fix link in from_fn.rs 079382c8d74f67726ac592dc7844cf248fa476e2 (link)
#136573 Document why some "type mismatches" exist d54a1c3629bff14e1d44e6ce44a2cd96e6cbcfda (link)
#136583 Only highlight unmatchable parameters at the definition site 3ed04a1f799560e7594c1f4989abe7ba05317fe6 (link)
#136587 Update browser-ui-test version to 0.20.2 91ad62ea7783ab120bb61c943e0ecd16472e05e9 (link)
#136590 Implement RustcInternal for RawPtrKind 45400bcc9dc159b33b4ead2f855826097423251a (link)
#136591 Add rustc_hir_pretty::expr_to_string function 97105682282c709c518c20d3bb2452062455bfc9 (link)
#136595 Fix unreachable_pub lint for hermit target 544e48eaf77678e9a2d33b673eb7c089e33f8591 (link)
#136611 cg_llvm: Remove the mod llvm_ hack, which should no longe… f499a9f457248254d1be3b32d22da76195e293bd (link)

previous master: c753cb9b42

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

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

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

Max RSS (memory usage)

Results (secondary -3.6%)

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.6% [-3.6%, -3.6%] 1
All ❌✅ (primary) - - 0

Cycles

Results (primary 3.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)
3.8% [1.0%, 6.9%] 12
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.8% [1.0%, 6.9%] 12

Binary size

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

Bootstrap: 777.255s -> 779.996s (0.35%)
Artifact size: 328.96 MiB -> 329.00 MiB (0.01%)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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.