Skip to content

Rollup of 7 pull requests#159212

Closed
jhpratt wants to merge 20 commits into
rust-lang:mainfrom
jhpratt:rollup-QV2G05F
Closed

Rollup of 7 pull requests#159212
jhpratt wants to merge 20 commits into
rust-lang:mainfrom
jhpratt:rollup-QV2G05F

Conversation

@jhpratt

@jhpratt jhpratt commented Jul 13, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

0xEgao and others added 20 commits July 6, 2026 13:11
Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
This demonstrates the `if cfg!(..)` suggestion being applied wrongly,
when a `cfg` attribute is followed by a non-`cfg` attribute.
The line `&& segment.ident.name == sym::cfg` duplicates a line from just
a few lines above in the same if-let chain. It's clear from context that
the `segment` is a copy/paste error and should be `next_segment`. This
fixes the erroneous suggestion given for
`multiple-tail-expr-behind-cfg.rs`.
…xpr-typo, r=chenyukang

Fix `attr_on_non_tail_expr` typo

This PR fixes a minor diagnostics bug from rust-lang#117988. Details in individual commits.

r? @estebank
…ve-path, r=ShoyuVanilla

Fix relative paths in private import suggestions

Resolves rust-lang#157455.

The private import diagnostic was reusing `import.module_path` for the "import directly" help. That path is relative to the module where the import was written, so a relative import can be suggested from the wrong place.

For the issue repro, this suggested:

```rust
use super::public::hi;
```

from the crate root. The suggestion should be:

```rust
use public::hi;
```

For relative local imports, this PR rebuilds the help from the resolved module path and only emits it if the item and every module segment are accessible from the failing use site. Additionally, this covers the private-ancestor case from rust-lang#157455 (comment), where suggesting a direct path would still be invalid. Finally, it maintains an external-alias case as a guardrail to ensure `super::s::mem` is not treated like a local module path.
Document NonNull layout guarantees

As discussed [here](rust-lang#157982 (comment))
Fixes rust-lang#157741

This updates the `NonNull` layout docs to match the structure and wording used by `NonZero`.

- adds the missing `NonNull<T>` layout and validity wording, and documents that `Option<NonNull<T>>` is compatible with `*mut T`, including in FFI.

r? @RalfJung
… r=khyperia

enable `do_not_recommend` attr for method call errors in current solver

This should help with rust-lang#146381 (comment)

The logic is mostly copied from the `apply_do_not_recommend` function.

r? @khyperia :3
…=davidtwco

Pretty-print MIR user types too.

`ty::UserType` is currently dumped in MIR using debug-printing of types. Unfortunately, this shows the inner index of DefIds, which can change between compilations depending on `cfg` flags.

This PR proposes to wire `ty::UserType` into the normal pretty-printing infra, which will give more readable outputs. This also adds a test, as we did not have any mir-opt case featuring non-None `user_self_ty`.

Exact formatting to bikeshed.
…010, r=nnethercote

Add codegen test for constant returns after local use

Closes rust-lang#91010
…vidtwco

rustc_target: Add acquire-release to implied features of v8

`acquire-release` target feature has been added in rust-lang#158405, but I missed that existing `v8` target feature [implies it in LLVM](https://github.com/llvm/llvm-project/blob/llvmorg-22.1.8/llvm/lib/Target/ARM/ARMFeatures.td#L645).

r? @davidtwco

@rustbot label +O-arm +A-target-feature
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jul 13, 2026
@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. labels Jul 13, 2026
@jhpratt

jhpratt commented Jul 13, 2026

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

📌 Commit ebc78e1 has been approved by jhpratt

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 Jul 13, 2026
@jhpratt jhpratt closed this Jul 13, 2026
@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 13, 2026
@rust-bors rust-bors Bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 13, 2026
@rust-bors

rust-bors Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

@jhpratt jhpratt deleted the rollup-QV2G05F branch July 13, 2026 09:53
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-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.

9 participants