Rollup of 23 pull requests - #160455
Closed
JonathanBrouwer wants to merge 60 commits into
Closed
Conversation
Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
```
error[E0277]: the trait bound `needs_borrow::Hello: needs_borrow::Tr` is not satisfied
--> $DIR/ownership-mismatch-on-arg.rs:42:13
|
LL | foo(hi, hi, hi);
| ^^^ -- -- `needs_borrow::Hello` doesn't satisfy the trait bound
| | |
| | `needs_borrow::Hello` doesn't satisfy the trait bound
| unsatisfied trait bound
|
help: the trait `needs_borrow::Tr` is not implemented for `needs_borrow::Hello`
--> $DIR/ownership-mismatch-on-arg.rs:27:5
|
LL | struct Hello;
| ^^^^^^^^^^^^
help: the trait `needs_borrow::Tr` is implemented for `&needs_borrow::Hello`
--> $DIR/ownership-mismatch-on-arg.rs:30:5
|
LL | impl Tr for &Hello {}
| ^^^^^^^^^^^^^^^^^^
note: required by a bound in `needs_borrow::foo`
--> $DIR/ownership-mismatch-on-arg.rs:32:15
|
LL | fn foo<T: Tr, K: std::fmt::Debug>(_v: T, _w: T, _k: K) {}
| ^^ required by this bound in `foo`
help: consider borrowing these argument
|
LL | foo(&hi, &hi, hi);
| + +
```
The linux kernel still uses fentry for x86 and s390x arches. s390x depends entirely on the compiler to record and nop these sections. This facilitates support for inserting nop's and/or recording the location of each mcount call in a special section named `__mcount_loc`. These attributes are currently only supported with fentry on the s390x target, otherwise they are quietly ignored (except on s390x).
* fix borrowck ICE for consts with fn pointer type annotate_argument_and_return_for_borrow called tcx.fn_sig on the item being checked whenever its type was FnDef or FnPtr. for a const whose type is a fn pointer that's not a function item, so we ICE'd with "unexpected sort of node in fn_sig". take the signature from the fn ptr type instead and skip the annotation when there's no fn decl. * run rustfmt and refmt * fix borrowck ICE for consts with fn pointer type annotate_argument_and_return_for_borrow called tcx.fn_sig on the item being checked whenever its type was FnDef or FnPtr. for a const whose type is a fn pointer that's not a function item, so we ICE'd with "unexpected sort of node in fn_sig". take the signature from the fn ptr type instead and skip the annotation when there's no fn decl. * edit comment * use ty.fn_sig per review
…uf_at` When fingers really want to type `read_exact`, that naturally leads to the typo `read_exact_buf` instead of `read_buf_exact`, and `read_exact_buf_at` instead of `read_buf_exact_at`. Add doc aliases. These will help people find them in rustdoc, and once rust-lang#160369 goes in, it'll also help people find them as rustfix suggestions.
… names We currently prefer candidates from a similarity search over doc aliases or `rustc_confusables`, even though the latter requires an *exact* match. Reverse this order, so that an exactly matching doc alias or `rustc_confusables` entry will take precedence. The net result of this is that `read_exact_buf` will now produce a suggestion for `read_buf_exact`, not `read_exact`, if both exist and the former has a doc alias for `read_exact_buf`.
Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
This commit changes `DEP_KIND_NUM_VARIANTS` so it's an associated const (renamed as `DepKind::NUM_VARIANTS`) obtained via `std::mem::variant_count`, removing the paranoid consecutiveness check. The commit also replaces multiple `DepKind::MAX as usize + 1` occurrences with `DepKind::NUM_VARIANTS`.
It contains pre-stringified versions of all the `DepKind` variants. But
we can just stringify on demand using `format!("{:?}")`.
Contributor
Author
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 3, 2026
Rollup of 23 pull requests try-job: dist-various-1 try-job: test-various try-job: x86_64-gnu-aux try-job: x86_64-gnu-llvm-21-3 try-job: x86_64-msvc-1 try-job: aarch64-apple try-job: x86_64-mingw-1 try-job: i686-msvc-*
Contributor
Author
|
@bors p=8 |
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 3, 2026
…uwer Rollup of 23 pull requests Successful merges: - #153749 (Account for ownership mismatch on argument that doesn't meet bound) - #159326 (Deny multiple EII impls on a single item) - #159535 (Optimize slice::contains for bytewise types) - #159595 (Promote loongarch32-unknown-none* to Tier 2) - #160007 (allow `-Ldependency` search paths for panic runtimes) - #160184 (Add -Zinstrument-mcount={fentry-nop-record,fentry-record}) - #160320 (point at trait definition when it is used as a derive macro) - #160369 (When suggesting method names, prefer *exact* doc aliases over similar names) - #160406 (`DepKind` cleanups) - #160424 (Use `thread::available_parallelism` as the default limit for backend parallelism) - #159303 (Fix ICE for direct inline const generic defaults) - #159977 (Add regression test for bool indexing codegen) - #160011 (remove InterpError::map_err_info) - #160165 (reject `...` without pattern post-expansion) - #160295 (Fix rustdoc ICE when checking if a generic arg can be elided) - #160305 (Linkify C-SKY targets in `platform-support.md`) - #160314 (fix borrowck ICE for consts with fn pointer type) - #160322 (ElaborateBoxDeref: remove unnecessary projection) - #160338 (Add regression test for supertrait associated type normalization through dyn) - #160340 (Add regression test for unused_parens on contract clauses) - #160371 (Add doc aliases for transpositions `read_exact_buf` and `read_exact_buf_at`) - #160384 (Add PR body notes for Cargo lock file maintenance) - #160435 (bump tracing-tree)
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot)Important For more information how to resolve CI failures of this job, visit this link. |
Contributor
|
💔 Test for 39c260c failed: CI. Failed job:
|
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for 3f37f5b failed: CI. Failed job:
|
Contributor
|
PR #160007, which is a member of this rollup, was unapproved. |
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:
-Ldependencysearch paths for panic runtimes #160007 (allow-Ldependencysearch paths for panic runtimes)DepKindcleanups #160406 (DepKindcleanups)thread::available_parallelismas the default limit for backend parallelism #160424 (Usethread::available_parallelismas the default limit for backend parallelism)...without pattern post-expansion #160165 (reject...without pattern post-expansion)platform-support.md#160305 (Linkify C-SKY targets inplatform-support.md)read_exact_bufandread_exact_buf_at#160371 (Add doc aliases for transpositionsread_exact_bufandread_exact_buf_at)r? @ghost
Create a similar rollup