-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not suggest using a const parameter when there are bounds on an unused type parameter #93400
Do not suggest using a const parameter when there are bounds on an unused type parameter #93400
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
a3e7727
to
7c7b5f5
Compare
Looks like |
Thanks for the PR, @ChayimFriedman2! Maybe someone from the diagnostics working group can help you. r? rust-lang/diagnostics |
You might be able to use |
28a5d17
to
a1df803
Compare
This comment has been minimized.
This comment has been minimized.
b58c6bd
to
49c5a8d
Compare
Unfortunately, rust/compiler/rustc_typeck/src/collect.rs Lines 2179 to 2185 in 450ef86
I ended with rather ugly (IMHO) code that lazily lowers the types in the |
49c5a8d
to
3dcb72c
Compare
This comment has been minimized.
This comment has been minimized.
3dcb72c
to
eef7ee8
Compare
This comment has been minimized.
This comment has been minimized.
eef7ee8
to
35db1e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks reasonable but I'm not familiar enough with typeck to know for sure, will reassign.
r? @jackh726 |
☔ The latest upstream changes (presumably #93368) made this pull request unmergeable. Please resolve the merge conflicts. |
35db1e7
to
003cfc2
Compare
This comment has been minimized.
This comment has been minimized.
…used type parameter The user wrote the bound, so it's obvious they want a type.
003cfc2
to
4520045
Compare
@bors r+ |
📌 Commit 4520045 has been approved by |
…const-with-bounds-unused-generic-param, r=jackh726 Do not suggest using a const parameter when there are bounds on an unused type parameter The user wrote the bound, so it's obvious they want a type.
…askrgr Rollup of 5 pull requests Successful merges: - rust-lang#93400 (Do not suggest using a const parameter when there are bounds on an unused type parameter) - rust-lang#93982 (Provide extra note if synthetic type args are specified) - rust-lang#94087 (Remove unused `unsound_ignore_borrow_on_drop`) - rust-lang#94235 (chalk: Fix wrong debrujin index in opaque type handling.) - rust-lang#94306 (Avoid exhausting stack space in dominator compression) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
The user wrote the bound, so it's obvious they want a type.