Skip to content

Rollup of 7 pull requests #138890

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

Closed
wants to merge 18 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

RalfJung and others added 18 commits March 21, 2025 08:08
Since array and slice constants are now lowered to array and slice
patterns, `non_scalar_compare` was only called for string comparisons.
This specializes it to strings, renames it, and removes the unused
array-unsizing logic.

This also updates some outdated doc comments.
- Should be same as absolute in UEFI since there are no symlinks.
- Also each absolute path representation should be unique according to
  the UEFI specification.

Signed-off-by: Ayush Singh <[email protected]>
- UEFI does not have symlinks. So lstat and stat should behave the same.

Signed-off-by: Ayush Singh <[email protected]>
UEFI does not have specific modes for create_new, truncate and append.
So those need to to be simulated after opening the file.

Signed-off-by: Ayush Singh <[email protected]>
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
…hop,petrochenkov

Implement some basics in UEFI fs

- Just getting some basics out of the way while waiting for rust-lang#138236 to be merged.
- Adds `fs::canonicalize`. Should be same as absolute in case of UEFI since there is no symlink support and absolute path is guaranteed to be uniqe according to spec.
- Make `fs::lstat` same as `fs::stat`. Should be same since UEFI does not have symlink support.
- Implement `OptionOptions`.

cc ```@nicholasbishop``` ```@dvdhrm```
remove remnants of const_box feature

This feature requires major design work, and the few methods it gates currently aren't actually useful. Let's reset to a clean slate so when a design materializes, we can start from scratch.

Closes rust-lang#92521 by removing the feature it tracks.

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

match lowering cleanup: remove unused unsizing logic from `non_scalar_compare`

Since array and slice constants are now translated to array and slice patterns, `non_scalar_compare` is only used for string comparisons. This specializes it to strings, renames it, and removes the unused array-unsizing logic.

This also updates the doc comments for  `thir::PatKind::Constant` and `TestKind::Eq`, which referred to them being used for slice references.

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

Rework `--print` options documentation

This PR reworks the `--print` options documentation, by making it more like codegen options with a dedicated page.

I also added some examples and split some paragraph into multiple paragraph since we now have more place.

r? ``@jieyouxu``
…e1-dead

`with_scope` is only ever used for ast modules

Thus I renamed it to match other similar functions (`with_mod_rib`) and made it panic if used on non-modules
@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 24, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Mar 24, 2025

📌 Commit 79e42cf 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 24, 2025
@bors
Copy link
Collaborator

bors commented Mar 24, 2025

⌛ Testing commit 79e42cf with merge 9fc908f...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 24, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#138601 (add FCW to warn about wasm ABI transition)
 - rust-lang#138662 (Implement some basics in UEFI fs)
 - rust-lang#138800 (remove remnants of const_box feature)
 - rust-lang#138821 (match lowering cleanup: remove unused unsizing logic from `non_scalar_compare`)
 - rust-lang#138864 (Rework `--print` options documentation)
 - rust-lang#138868 (Add do_not_recommend typo help)
 - rust-lang#138882 (`with_scope` is only ever used for ast modules)

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
Collaborator

bors commented Mar 24, 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 24, 2025
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-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.

10 participants