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

Closed
wants to merge 24 commits into from
Closed

Conversation

tgross35
Copy link
Contributor

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

bjorn3 and others added 24 commits March 13, 2025 10:01
Rather than requiring the user to pass in a correctly sized blocks map.
Flatten some `if`s into match patterns
Use `str::strip_prefix` instead of `starts_with`+indexing
Avoid redundant tests for `extra.is_some()`
- Events are going to become quite important for Networking, so needed
  owned abstractions.
- Switch to OwnedEvent abstraction for Exit boot services event.

Signed-off-by: Ayush Singh <[email protected]>
If debuginfo has been requested in `config.toml`, it should be packaged
alongside the appropriate binary when running `x.py dist`.

Currently, this is only implemented for msvc environments where split
debuginfo is (basically) the only option. I've tested that this
correctly packages the `.pdb` for each binary in the various dist
packages.
In rust-lang#108326, `read_buf` was implemented for a variety of types, but SGX
was saved for later. Update a test from then, now that rust-lang#137355
implemented it for SGX types.
Implement `make_mir_visitor` macro to generate `MirVisitor` and `MutMirVisitor`.

Add `ret_local_mut()`, `arg_locals_mut()` and `inner_locals_mut()` to `Body`, specifically for `MutMirVisitor`.
They are marked with hidden visibility to prevent them from getting
exported, so we shouldn't ask the linker to export them anyway. The only
thing that does it cause a warning on macOS.
Otherwise the linker complains about EC symbols missing when compiling
for arm64ec.
…x, r=petrochenkov

Don't attempt to export compiler-builtins symbols from rust dylibs

They are marked with hidden visibility to prevent them from getting exported, so we shouldn't ask the linker to export them anyway. The only thing that does it cause a warning on macOS.

Part of rust-lang#136096

cc `@jyn514`
uefi: Add OwnedEvent abstraction

- Events are going to become quite important for Networking, so needed owned abstractions.
- Switch to OwnedEvent abstraction for Exit boot services event.

cc ``@nicholasbishop``
…, r=onur-ozkan

[bootstrap] Distribute split debuginfo if present

If debuginfo has been requested in `config.toml`, it should be packaged alongside the appropriate binary when running `x.py dist`.

Currently, this is only implemented for msvc environments where split debuginfo is (basically) the only option. I've tested that this correctly packages the `.pdb` for each binary in the various dist packages.
Forward `stream_position` in `Arc<File>` as well

It was missed in rust-lang#137165.
…arse-cleanup, r=notriddle

Cleanup `LangString::parse`

Flatten some `if`s into match patterns
Use `str::strip_prefix` instead of `starts_with`+indexing
Avoid redundant tests for `extra.is_some()`
stable_mir: Add `MutMirVisitor`

Resolves: [rust-lang/project-stable-mir#81](rust-lang/project-stable-mir#81).

I am unsure if we should add a `MutableBody` like Kani did.
Currently, I use `&mut Body` in `MutMirVisitor::visit_body()`.

r? `````@celinval`````
resolve: Avoid some unstable iteration 2

Continuation of rust-lang#138502.
add FCW to warn about wasm ABI transition

See rust-lang#122532 for context: the "C" ABI on wasm32-unk-unk will change. The goal of this lint is to warn about any function definition and calls whose behavior will be affected by the change. My understanding is the following:
- scalar arguments are fine
  - including 128 bit types, they get passed as two `i64` arguments in both ABIs
- `repr(C)` structs (recursively) wrapping a single scalar argument are fine (unless they have extra padding due to over-alignment attributes)
- all return values are fine

`@bjorn3` `@alexcrichton` `@Manishearth` is that correct?

I am making this a "show up in future compat reports" lint to maximize the chances people become aware of this. OTOH this likely means warnings for most users of Diplomat so maybe we shouldn't do this?

IIUC, wasm-bindgen should be unaffected by this lint as they only pass scalar types as arguments.

Tracking issue: rust-lang#138762
Transition plan blog post: rust-lang/blog.rust-lang.org#1531
…orkingjubilee

Update test for SGX now implementing `read_buf`

In rust-lang#108326, `read_buf` was implemented for a variety of types, but SGX was saved for later. Update a test from then, now that rust-lang#137355 implemented it for SGX types.

cc ``@jethrogb``
@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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Mar 22, 2025
@rustbot rustbot added the rollup A PR which is a rollup label Mar 22, 2025
@tgross35
Copy link
Contributor Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Mar 22, 2025

📌 Commit 2799f83 has been approved by tgross35

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

bors commented Mar 22, 2025

⌛ Testing commit 2799f83 with merge ab162c6a594b4853edc7d336b94b25ada18f74cc...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 22, 2025
Rollup of 10 pull requests

Successful merges:

 - rust-lang#137736 (Don't attempt to export compiler-builtins symbols from rust dylibs)
 - rust-lang#138236 (uefi: Add OwnedEvent abstraction)
 - rust-lang#138321 ([bootstrap] Distribute split debuginfo if present)
 - rust-lang#138410 (Couple mir building cleanups)
 - rust-lang#138490 (Forward `stream_position` in `Arc<File>` as well)
 - rust-lang#138535 (Cleanup `LangString::parse`)
 - rust-lang#138536 (stable_mir: Add `MutMirVisitor`)
 - rust-lang#138580 (resolve: Avoid some unstable iteration 2)
 - rust-lang#138601 (add FCW to warn about wasm ABI transition)
 - rust-lang#138631 (Update test for SGX now implementing `read_buf`)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job dist-various-2 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling test v0.0.0 (/checkout/library/test)
error: this function definition involves an argument of type `buffer::Buffer` which is affected by the wasm ABI transition
   --> library/proc_macro/src/bridge/buffer.rs:143:9
    |
143 |         extern "C" fn reserve(b: Buffer, additional: usize) -> Buffer {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #138762 <https://github.com/rust-lang/rust/issues/138762>
    = help: the "C" ABI Rust uses on wasm32-unknown-unknown will change to align with the standard "C" ABI for this target
---

error: this function call involves an argument of type `buffer::Buffer` which is affected by the wasm ABI transition
  --> library/proc_macro/src/bridge/closure.rs:30:18
   |
30 |         unsafe { (self.call)(self.env, arg) }
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #138762 <https://github.com/rust-lang/rust/issues/138762>
   = help: the "C" ABI Rust uses on wasm32-unknown-unknown will change to align with the standard "C" ABI for this target
---

error: this function call involves an argument of type `buffer::Buffer` which is affected by the wasm ABI transition
  --> library/proc_macro/src/bridge/buffer.rs:93:21
   |
93 |             *self = (b.reserve)(b, 1);
   |                     ^^^^^^^^^^^^^^^^^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #138762 <https://github.com/rust-lang/rust/issues/138762>
   = help: the "C" ABI Rust uses on wasm32-unknown-unknown will change to align with the standard "C" ABI for this target

error: this function call involves an argument of type `buffer::Buffer` which is affected by the wasm ABI transition
   --> library/proc_macro/src/bridge/buffer.rs:125:9
    |
125 |         (b.drop)(b);
    |         ^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #138762 <https://github.com/rust-lang/rust/issues/138762>
    = help: the "C" ABI Rust uses on wasm32-unknown-unknown will change to align with the standard "C" ABI for this target

error: this function call involves an argument of type `buffer::Buffer` which is affected by the wasm ABI transition
  --> library/proc_macro/src/bridge/buffer.rs:66:21
   |
66 |             *self = (b.reserve)(b, xs.len());
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #138762 <https://github.com/rust-lang/rust/issues/138762>
   = help: the "C" ABI Rust uses on wasm32-unknown-unknown will change to align with the standard "C" ABI for this target

note: the above error was encountered while instantiating `fn bridge::buffer::Buffer::extend_from_array::<4>`
   --> library/proc_macro/src/bridge/rpc.rs:28:17
    |
24  | / macro_rules! rpc_encode_decode {
25  | |     (le $ty:ty) => {
26  | |         impl<S> Encode<S> for $ty {
27  | |             fn encode(self, w: &mut Writer, _: &mut S) {
28  | |                 w.extend_from_array(&self.to_le_bytes());
    | |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...   |
105 | | }
    | |_- in this expansion of `rpc_encode_decode!`
...
129 |   rpc_encode_decode!(le u32);
    |   -------------------------- in this macro invocation

note: the above error was encountered while instantiating `fn bridge::client::<impl bridge::symbol::Symbol>::normalize_and_validate_ident::{closure#0}`
   --> library/proc_macro/src/bridge/client.rs:233:13
    |
233 |             f(&mut bridge)
    |             ^^^^^^^^^^^^^^

error: this function call involves an argument of type `buffer::Buffer` which is affected by the wasm ABI transition
  --> library/proc_macro/src/bridge/buffer.rs:78:21
   |
78 |             *self = (b.reserve)(b, xs.len());
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #138762 <https://github.com/rust-lang/rust/issues/138762>
   = help: the "C" ABI Rust uses on wasm32-unknown-unknown will change to align with the standard "C" ABI for this target

note: the above error was encountered while instantiating `fn bridge::client::TokenStream::clone::{closure#0}`
   --> library/proc_macro/src/bridge/client.rs:233:13
    |
233 |             f(&mut bridge)
    |             ^^^^^^^^^^^^^^

note: the above error was encountered while instantiating `fn bridge::client::TokenStream::drop::{closure#0}`
   --> library/proc_macro/src/bridge/client.rs:233:13
    |
233 |             f(&mut bridge)
    |             ^^^^^^^^^^^^^^

note: the above error was encountered while instantiating `fn bridge::client::TokenStream::concat_trees::{closure#0}`
   --> library/proc_macro/src/bridge/client.rs:233:13
    |
233 |             f(&mut bridge)
    |             ^^^^^^^^^^^^^^

---
    |
233 |             f(&mut bridge)
    |             ^^^^^^^^^^^^^^

note: the above error was encountered while instantiating `fn bridge::client::FreeFunctions::drop::{closure#0}`
   --> library/proc_macro/src/bridge/client.rs:233:13
    |
233 |             f(&mut bridge)
    |             ^^^^^^^^^^^^^^

note: the above error was encountered while instantiating `fn bridge::client::SourceFile::drop::{closure#0}`
   --> library/proc_macro/src/bridge/client.rs:233:13
    |
233 |             f(&mut bridge)
    |             ^^^^^^^^^^^^^^

---
    |
233 |             f(&mut bridge)
    |             ^^^^^^^^^^^^^^

note: the above error was encountered while instantiating `fn bridge::client::TokenStream::expand_expr::{closure#0}`
   --> library/proc_macro/src/bridge/client.rs:233:13
    |
233 |             f(&mut bridge)
    |             ^^^^^^^^^^^^^^

---
    |
233 |             f(&mut bridge)
    |             ^^^^^^^^^^^^^^

note: the above error was encountered while instantiating `fn bridge::client::TokenStream::from_token_tree::{closure#0}`
   --> library/proc_macro/src/bridge/client.rs:233:13
    |
233 |             f(&mut bridge)
    |             ^^^^^^^^^^^^^^

note: the above error was encountered while instantiating `fn bridge::client::TokenStream::concat_streams::{closure#0}`
   --> library/proc_macro/src/bridge/client.rs:233:13
    |
233 |             f(&mut bridge)
    |             ^^^^^^^^^^^^^^

---
    |
233 |             f(&mut bridge)
    |             ^^^^^^^^^^^^^^

note: the above error was encountered while instantiating `fn bridge::client::Span::column::{closure#0}`
   --> library/proc_macro/src/bridge/client.rs:233:13
    |
233 |             f(&mut bridge)
    |             ^^^^^^^^^^^^^^

note: the above error was encountered while instantiating `fn bridge::client::Span::join::{closure#0}`
   --> library/proc_macro/src/bridge/client.rs:233:13
    |
233 |             f(&mut bridge)
    |             ^^^^^^^^^^^^^^

note: the above error was encountered while instantiating `fn bridge::client::Span::resolved_at::{closure#0}`
   --> library/proc_macro/src/bridge/client.rs:233:13
    |
233 |             f(&mut bridge)
    |             ^^^^^^^^^^^^^^

---
    |
233 |             f(&mut bridge)
    |             ^^^^^^^^^^^^^^

note: the above error was encountered while instantiating `fn bridge::client::SourceFile::eq::{closure#0}`
   --> library/proc_macro/src/bridge/client.rs:233:13
    |
233 |             f(&mut bridge)
    |             ^^^^^^^^^^^^^^

@bors
Copy link
Contributor

bors commented Mar 22, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 22, 2025
@tgross35 tgross35 closed this Mar 22, 2025
@tgross35 tgross35 deleted the rollup-agm26cd branch March 22, 2025 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup 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. 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.