Skip to content

Rollup of 3 pull requests#153729

Closed
JonathanBrouwer wants to merge 6 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-BPQWiPL
Closed

Rollup of 3 pull requests#153729
JonathanBrouwer wants to merge 6 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-BPQWiPL

Conversation

@JonathanBrouwer
Copy link
Contributor

Successful merges:

r? @ghost

Create a similar rollup

oli-obk and others added 6 commits March 7, 2026 15:36
When a delegation path like `reuse Trait::<> as bar4` has a child segment
that resolves to a trait instead of a function, the compiler would ICE
because `lower_generic_args_of_path` asserts that `self_ty` is `Some`
when `has_self` is true and `parent` is `None`.

Fix this by filtering out non-function child segments early using
`.filter()` in the method chain, so that when the child segment resolves
to a trait (error recovery for E0423), we skip generic args computation
entirely and return an empty list via `unwrap_or_default()`.

Also make `get_segment` return `Option` by using `opt_def_id()` instead
of `def_id()` to gracefully handle unresolved segments.
…range_end_end, r=davidtwco

Stop using rustc_layout_scalar_valid_range_* in rustc

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152569)*

Another step towards rust-lang#135996

Required some manual impls, but we already do many manual impls for the newtype_index types, so it's not really a new maintenance burden.
…petrochenkov

Fix ICE in fn_delegation when child segment resolves to a trait

Fixes rust-lang#153420

When a delegation path like `reuse Trait::<> as bar4` has only one segment resolving to a trait (not a function), the child args processing in `get_delegation_user_specified_args` called `lower_generic_args_of_path` with `self_ty = None`. Since the trait's generics have `has_self = true`, this triggered
`assert!(self_ty.is_some())`.

Fix by computing and providing `self_ty` when the child segment's `def_id` has `has_self`. In valid delegation code the child segment always resolves to a function, so this only affects error recovery.
miri-test-libstd: use --tests and update some comments

rust-lang#153143 added `./x test --tests` matching `cargo --tests`, which is exactly what Miri wants when testing the standard library. So let's use it for that. We can then also remove a hack in `library/alloctests/benches/vec_deque_append.rs`.

Also update the comment for why the other benchmarks still need to be disabled in Miri, and remove some `cfg_attr` that seem unnecessary since the entire crate that contains them is already disabled in Miri. Those were copied over in rust-lang@b8fa843 -- they used to be needed since benches and tests were in the same crate, but they aren't any more.
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Mar 11, 2026
@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. labels Mar 11, 2026
@JonathanBrouwer
Copy link
Contributor Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 11, 2026

📌 Commit 878cc93 has been approved by JonathanBrouwer

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened.

@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 Mar 11, 2026
@rust-bors rust-bors bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 11, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 11, 2026

This pull request was unapproved due to being closed.

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-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants