Skip to content

Rollup of 5 pull requests#155432

Open
JonathanBrouwer wants to merge 11 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-dJVrrO0
Open

Rollup of 5 pull requests#155432
JonathanBrouwer wants to merge 11 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-dJVrrO0

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

Failed merges:

r? @ghost

Create a similar rollup

JonathanBrouwer and others added 11 commits April 3, 2026 23:41
…jdonszelmann

Fix attribute order implementation

The implementation in rust-lang#153041 contained a mistake :c
I swapped the place where the error message was on, but did not change any code for which attribute was also selected, which explains the empty crater results.
**Interestingly, the original code is broken too, before rust-lang#153041 it always took the last attribute, regardless of what the `AttributeOrder` actually was...**

Let's first see crater results before making a decision

TODO for this PR: Make better tests for this
resolve: Introduce `(Local,Extern)Module` newtypes for local and external modules respectively

Right now both `LocalModule` and `ExternModule` refer to the same `ModuleData`, but the module data for local and extern modules can potentially be made quite different, and we can specialize name lookup for both cases as an optimization.

Declaration creation for local and external modules was already specialized as a part of the parallel import resolution work (see `define_local` and `define_extern`, rust-lang#145108 and previous PRs), because they have different properties with regards to ownership and synchronization.
…rror-kind, r=tgross35

Add `TryFromIntError::kind` method and `IntErrorKind::NotAPowerOfTwo` variant

- ACP: rust-lang/libs-team#746
- Tracking issue: rust-lang#153978

This pull request adds `kind` method to [`TryFromIntError`](https://doc.rust-lang.org/core/num/struct.TryFromIntError.html), which outputs the detailed cause of converting an integer failing.

This is primarily intended for use in cases where there are multiple causes for failure, such as converting from a large signed integer type to a small signed integer type.

At the moment, this method returns [`&IntErrorKind`](https://doc.rust-lang.org/core/num/enum.IntErrorKind.html). This type implements the `Copy` trait and could return `IntErrorKind`, but returns a reference to align with the behavior of [`ParseIntError::kind`](https://doc.rust-lang.org/core/num/struct.ParseIntError.html#method.kind). If it is not necessary to align the behavior of `TryFromIntError::kind` with `ParseIntError::kind`, I'll change this method to return `IntErrorKind`.

Before this pull request, `IntErrorKind` was only used by [`ParseIntError`](https://doc.rust-lang.org/core/num/struct.ParseIntError.html), but I changed it to be used by `TryFromIntError` as well, so I updated `IntErrorKind`'s documentation.

[`impl TryFrom<usize> for Alignment`](https://doc.rust-lang.org/std/ptr/struct.Alignment.html#impl-TryFrom%3Cusize%3E-for-Alignment) returns `TryFromIntError` as an error if the given value is not a power of two. However, `IntErrorKind` does not have a variant that represents this. So I added the variant `NotAPowerOfTwo` to represent this. For this variant to stabilize, both `try_from_int_error_kind` and `ptr_alignment_type` features must be stabilized.
…ation-extension, r=jhpratt

Documenting the case of `Weak::upgrade` returning `None` when the value behind the reference is missing

Adds a clause to the documentation of `Weak` for `Arc` which was discussed in rust-lang#154936.

Adds the same clause to the documentation of `Weak` for `Rc`, because the behavior is the same.
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Apr 17, 2026
@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. labels Apr 17, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 17, 2026

📌 Commit f67a375 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors bot 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 Apr 17, 2026
@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Apr 17, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #154781 (Fix attribute order implementation)
 - #155242 (resolve: Introduce `(Local,Extern)Module` newtypes for local and external modules respectively)
 - #149614 (Use `MaybeDangling` in `std`)
 - #153178 (Add `TryFromIntError::kind` method and `IntErrorKind::NotAPowerOfTwo` variant)
 - #155049 (Documenting the case of `Weak::upgrade` returning `None` when the value behind the reference is missing)

Failed merges:

 - #155308 (Make `OnDuplicate::Error` the default for attributes)
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job dist-powerpc64-linux-gnu failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@rust-bors rust-bors bot 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 Apr 17, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 17, 2026

💔 Test for 8e668eb failed: CI. Failed job:

@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors retry
Spurious

@rust-bors rust-bors bot 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 Apr 17, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

Just to make sure
@bors try jobs=dist-powerpc64-linux-gnu

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 17, 2026

⌛ Trying commit f67a375 with merge 918149b

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/24575170993

rust-bors bot pushed a commit that referenced this pull request Apr 17, 2026
Rollup of 5 pull requests


try-job: dist-powerpc64-linux-gnu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) 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.

7 participants