Repository navigation
Tweak wording of "expected/found signature" errors - #164190
Merged
Merged
Conversation
Modify `on_unimplemented` attribute wording for `Fn*` traits.
Collaborator
|
r? @chenyukang rustbot has assigned @chenyukang. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Contributor
Author
|
Noticed while looking at #97010. |
Member
|
@bors r+ |
Contributor
This comment has been minimized.
This comment has been minimized.
Contributor
|
❌ Commit 2c1f6b7 has been unapproved due to PR CI failure. Reapprove it with |
```
error[E0277]: expected `Fn(<_ as ATC<'a>>::Type)` signature, found `F`
--> $DIR/issue-62529-3.rs:25:14
|
LL | call(f, ());
| ---- ^ expected `Fn(<_ as ATC<'a>>::Type)` signature, found `F`
| |
| required by a bound introduced by this call
|
= note: expected type with signature `for<'a> fn(<_ as ATC<'a>>::Type)`
found type parameter with signature `fn(())`
note: required by a bound in `call`
--> $DIR/issue-62529-3.rs:9:36
|
LL | fn call<'b, T: for<'a> ATC<'a>, F: for<'a> Fn(<T as ATC<'a>>::Type)>(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `call`
```
estebank
force-pushed
the
fn-signatures
branch
from
October 12, 2026 15:10
2c1f6b7 to
dc2da07
Compare
Contributor
Author
|
@bors r=chenyukang |
Contributor
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 12, 2026
Rollup of 7 pull requests Successful merges: - #163798 (validate generic parameter remapping in delegation) - #164134 (bootstrap: add an rpath to LLVM library for LLVM tools) - #164190 (Tweak wording of "expected/found signature" errors) - #163578 (Add internal #[rustc_assert_variance] attribute for use in std) - #164126 (tests: Ignore dynamic-loading-cdylib on musl hosts) - #164171 (More `tests/rustdoc-html` cleanups) - #164221 (tests: cover `dead_code_pub_in_binary` expectations with `--test`)
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 13, 2026
Rollup merge of #164190 - estebank:fn-signatures, r=chenyukang Tweak wording of "expected/found signature" errors Do not incorrectly state that we expected a closure when we expected *anything* that conforms to an `Fn*` trait.
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.
Do not incorrectly state that we expected a closure when we expected anything that conforms to an
Fn*trait.