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

Merged
merged 16 commits into from
Mar 13, 2025
Merged

Rollup of 8 pull requests #138459

merged 16 commits into from
Mar 13, 2025

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

ehuss and others added 16 commits March 12, 2025 06:11
After llvm/llvm-project#130382, RustWrapper
needs to call CfiFunctionIndex::symbols() instead.
The targets used the plain `$ARCH` triple, which LLVM normalizes to
`$ARCH-unknown-unknown`, which is inconsistent with the the other
VxWorks targets which all use `$ARCH-unknown-linux-gnu$ABI`.
…i-obk

Add an opt-out in pretty printing for RTN rendering

Today, we render RPITIT types like `impl Sized { T::method(..) }` when RTN is enabled. This is very useful for diagnostics, since it's often not clear what the `impl Sized` type means by itself, and it makes it clear that that's an RPITIT that can be bounded using RTN syntax. See rust-lang#115624.

However, since we don't distinguish types that are rendered for the purposes of printing messages vs suggestions, this representation leaks into suggestions and turns into code that can't be parsed. This PR adds a new `with_types_for_suggestion! {}` and `with_types_for_signature! {}` options to the pretty printing architecture to make it clear that we're rendering a type for code suggestions.

This can be applied later as we find that we need it.
…petrochenkov

Delegation: allow foreign fns `reuse`

In example:
```rust
unsafe extern "C" {
    fn foo();
}

reuse foo as bar;
```

Desugaring before:

```rust
fn bar() {
    foo()
    //~^ ERROR call to unsafe function `foo` is unsafe and requires unsafe function or block
}
```

after:

```rust
unsafe extern "C" fn bar() {
    foo()
}
```

Fixes rust-lang#127412

r? `@petrochenkov`
Update mdbook to 0.4.47

This updates mdbook to bring in an important fix that enables the `output.html.hash-files` option to deal with network caching.

Changelog:
https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0446
https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0447
minor interpreter cleanups

- remove the `eval_inline_asm` hook that `@saethlin` added; the usage never materialized and he agreed with removing it
- I tried merging `init_alloc_extra` and `adjust_global_allocation` and it didn't work; leave a comment as to why. Also, make the allocation code path a bit more clear by renaming `init_alloc_extra` to `init_local_allocation`.

r? `@oli-obk`
…in42

Adapt to LLVM dropping CfiFunctionIndex::begin()/end()

After llvm/llvm-project#130382, RustWrapper needs to call CfiFunctionIndex::symbols() instead.
…leLapkin

Don't emit error within cast function, propagate it as a `CastError`

Minor nitpick from rust-lang#136764.

r? `@WaffleLapkin`
…hpratt

Remove `feature = "hash_raw_entry"`

The `hash_raw_entry` feature finished [fcp-close](rust-lang#56167 (comment)) back in August, and its remaining uses in the compiler have now been removed, so we should be all clear to remove it from `std`.

Closes rust-lang#56167
…youxu

Fix RISC-V VxWorks LLVM target triples

The targets `riscv32-wrs-vxworks` and `riscv64-wrs-vxworks` uses the plain `$ARCH` LLVM triple, which LLVM normalizes to `$ARCH-unknown-unknown`, we should use `$ARCH-unknown-linux-gnu$ABI` which is consistent with the the other VxWorks targets.

Motivation: To make it easier to verify that [`cc-rs`' conversion from `rustc` to Clang/LLVM triples](rust-lang/cc-rs#1431) is correct.

Alternative: Pass `$ARCH-unknown-none` in the other VxWorks LLVM triples, I don't know anything about VxWorks, so am unsure which is the most correct option.

CC target maintainer `@biabbas.`
r? jieyouxu
@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. rollup A PR which is a rollup labels Mar 13, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Mar 13, 2025

📌 Commit 69b3ad1 has been approved by matthiaskrgr

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

bors commented Mar 13, 2025

⌛ Testing commit 69b3ad1 with merge cbfdf0b...

@bors
Copy link
Contributor

bors commented Mar 13, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing cbfdf0b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 13, 2025
@bors bors merged commit cbfdf0b into rust-lang:master Mar 13, 2025
7 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 13, 2025
Copy link

Post-merge analysis result

Test differences

  • x86_64-gnu-llvm-18-1
    • library/std/src/collections/hash/map.rs - collections::hash::map::Iter (line 1412): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::OccupiedEntry<'a,K,V>::get_mut (line 2572): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::VacantEntry<'a,K,V>::into_key (line 2694): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Entry<'a,K,V>::and_modify (line 2419): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::OccupiedEntry<'a,K,V>::key (line 2505): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Entry<'a,K,V>::or_insert (line 2321): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Entry<'a,K,V>::insert_entry (line 2453): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,RandomState>::from (line 1391): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::IntoIter (line 1498): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Values (line 1583): [missing] -> pass
    • (and 56 additional testss)
  • x86_64-gnu
    • library/std/src/collections/hash/map.rs - collections::hash::map::Entry<'a,K,V>::key (line 2399): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::VacantEntry<'a,K,V>::into_key (line 2694): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::IntoKeys (line 1717): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Drain (line 1630): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,RandomState>::from (line 1391): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::IterMut (line 1459): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Entry<'a,K,V>::or_insert_with_key (line 2374): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Iter (line 1412): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Values (line 1583): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S>::into_iter (line 1904): [missing] -> pass
    • (and 56 additional testss)
  • x86_64-gnu-stable
    • library/std/src/collections/hash/map.rs - collections::hash::map::Keys (line 1536): [missing] -> pass
    • [ui] tests/ui/associated-type-bounds/return-type-notation/rendering.rs: [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Iter (line 1412): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Entry<'a,K,V>::or_insert_with_key (line 2374): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::OccupiedEntry<'a,K,V>::get (line 2546): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Drain (line 1630): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::ExtractIf (line 1660): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::IntoKeys (line 1717): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::VacantEntry<'a,K,V>::insert_entry (line 2737): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,RandomState>::from (line 1391): [missing] -> pass
    • (and 56 additional testss)
  • i686-gnu-nopt-1
    • library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S>::into_iter (line 1904): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::OccupiedEntry<'a,K,V>::get_mut (line 2572): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Entry<'a,K,V>::insert_entry (line 2453): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::OccupiedEntry<'a,K,V>::remove_entry (line 2522): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::VacantEntry<'a,K,V>::key (line 2678): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::ExtractIf (line 1660): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::OccupiedEntry<'a,K,V>::into_mut (line 2605): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Drain (line 1630): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::VacantEntry<'a,K,V>::into_key (line 2694): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::VacantEntry<'a,K,V>::insert (line 2715): [missing] -> pass
    • (and 56 additional testss)
  • x86_64-gnu-nopt
    • library/std/src/collections/hash/map.rs - collections::hash::map::Entry<'a,K,V>::or_default (line 2480): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::IterMut (line 1459): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::IntoValues (line 1747): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::OccupiedEntry<'a,K,V>::get (line 2546): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::VacantEntry<'a,K,V>::into_key (line 2694): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::ValuesMut (line 1686): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Entry<'a,K,V>::or_insert (line 2321): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Keys (line 1536): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Entry<'a,K,V>::or_insert_with_key (line 2374): [missing] -> pass
    • [ui] tests/ui/associated-type-bounds/return-type-notation/rendering.rs: [missing] -> pass
    • (and 56 additional testss)
  • i686-msvc-1
    • library/std/src/collections/hash/map.rs - collections::hash::map::OccupiedEntry<'a,K,V>::remove_entry (line 2522): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::IntoValues (line 1747): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::OccupiedEntry<'a,K,V>::insert (line 2629): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::IntoKeys (line 1717): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::ValuesMut (line 1686): [missing] -> pass
    • [ui] tests/ui/associated-type-bounds/return-type-notation/rendering.rs: [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Entry<'a,K,V>::or_insert (line 2321): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::VacantEntry<'a,K,V>::insert (line 2715): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Keys (line 1536): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Drain (line 1630): [missing] -> pass
    • (and 56 additional testss)
  • x86_64-gnu-llvm-18-3
    • library/std/src/collections/hash/map.rs - collections::hash::map::OccupiedEntry<'a,K,V>::insert (line 2629): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Drain (line 1630): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Entry<'a,K,V>::or_default (line 2480): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::VacantEntry<'a,K,V>::into_key (line 2694): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::OccupiedEntry<'a,K,V>::get_mut (line 2572): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::VacantEntry<'a,K,V>::insert (line 2715): [missing] -> pass
    • [ui] tests/ui/associated-type-bounds/return-type-notation/rendering.rs: [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::IntoValues (line 1747): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Entry<'a,K,V>::or_insert_with (line 2346): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::OccupiedEntry<'a,K,V>::key (line 2505): [missing] -> pass
    • (and 56 additional testss)
  • x86_64-gnu-llvm-19-1
    • library/std/src/collections/hash/map.rs - collections::hash::map::Entry<'a,K,V>::or_insert_with_key (line 2374): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::IterMut (line 1459): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::OccupiedEntry<'a,K,V>::remove (line 2652): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::OccupiedEntry<'a,K,V>::into_mut (line 2605): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S>::into_iter (line 1904): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Entry<'a,K,V>::or_insert_with (line 2346): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Keys (line 1536): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::VacantEntry<'a,K,V>::insert (line 2715): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Values (line 1583): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::IntoKeys (line 1717): [missing] -> pass
    • (and 56 additional testss)
  • x86_64-msvc-1
    • library/std/src/collections/hash/map.rs - collections::hash::map::Entry<'a,K,V>::insert_entry (line 2453): [missing] -> pass
    • [ui] tests/ui/delegation/foreign-fn.rs: [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Entry<'a,K,V>::and_modify (line 2419): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::OccupiedEntry<'a,K,V>::remove_entry (line 2522): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::IterMut (line 1459): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::OccupiedEntry<'a,K,V>::remove (line 2652): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::IntoKeys (line 1717): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Entry<'a,K,V>::key (line 2399): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Values (line 1583): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::OccupiedEntry<'a,K,V>::get_mut (line 2572): [missing] -> pass
    • (and 56 additional testss)
  • aarch64-apple
    • library/std/src/collections/hash/map.rs - collections::hash::map::VacantEntry<'a,K,V>::key (line 2678): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::OccupiedEntry<'a,K,V>::get_mut (line 2572): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::OccupiedEntry<'a,K,V>::into_mut (line 2605): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::IntoValues (line 1747): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Entry<'a,K,V>::insert_entry (line 2453): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Entry<'a,K,V>::and_modify (line 2419): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::ValuesMut (line 1686): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::Iter (line 1412): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::IntoKeys (line 1717): [missing] -> pass
    • library/std/src/collections/hash/map.rs - collections::hash::map::VacantEntry<'a,K,V>::insert (line 2715): [missing] -> pass
    • (and 56 additional testss)

(and 12 additional diffs)

@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#138126 Add an opt-out in pretty printing for RTN rendering 28532a6957db042f2407b65e4b55543611876f9f (link)
#138399 Delegation: allow foreign fns reuse ba6ccfcba3c4b894749fb37e14aca20e3d062088 (link)
#138406 Update mdbook to 0.4.47 bfce3423f584f2122502a58ae635100991357b07 (link)
#138417 minor interpreter cleanups 977168c555ea4da23c6f986a71e220e6405c7a43 (link)
#138420 Adapt to LLVM dropping CfiFunctionIndex::begin()/end() bcf77eb551e70f74db3d04e8e09b8c7dfdb9aa31 (link)
#138423 Don't emit error within cast function, propagate it as a `C… 13c22176073de9e5c374c94a92b01c423a72385a (link)
#138425 Remove feature = "hash_raw_entry" 361e7c3fda74311ae40ac455b88175f89b40170a (link)
#138427 Fix RISC-V VxWorks LLVM target triples abc277c4fab8c38dc844ef615928ca2659e96ba1 (link)

previous master: 52daa7d835

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

Overall result: ❌✅ regressions and improvements - 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
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 2
Improvements ✅
(primary)
-0.3% [-0.3%, -0.3%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.3% [-0.3%, -0.3%] 1

Max RSS (memory usage)

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

Cycles

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

Binary size

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

Bootstrap: 774.166s -> 774.314s (0.02%)
Artifact size: 365.07 MiB -> 365.05 MiB (-0.01%)

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. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet