Rollup of 7 pull requests#159212
Closed
jhpratt wants to merge 20 commits into
Closed
Conversation
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
Member
Author
|
@bors r+ rollup=never p=5 |
Contributor
Contributor
|
This pull request was unapproved due to being closed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
attr_on_non_tail_exprtypo #159208 (Fixattr_on_non_tail_exprtypo)do_not_recommendattr for method call errors in current solver #158882 (enabledo_not_recommendattr for method call errors in current solver)r? @ghost
Create a similar rollup