-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add help note to unconstrained const parameter #76401
Conversation
20e023f
to
f9a20d4
Compare
Can you add https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=51d59876e3827706e44f9891bf73dfe8 as a test? I am not sure how well the error message reads in that case |
75c26a7
to
7943955
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.
LGTM with nit fixed
📌 Commit a1fcdff374551c213f986f226505f64cb26a011e has been approved by |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit a1fcdff374551c213f986f226505f64cb26a011e has been approved by |
@bors r=lcnr It got reset when @JulianKnodt pushed the fixes to my nit (whoops) |
📌 Commit ee55c1f has been approved by |
"expressions using a const parameter must map each value to a distinct output value", | ||
); | ||
err.note( | ||
"proving the result of expressions other than the parameter are unique is not supported", |
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 the meaning of this comment may not be entirely clear to someone unfamiliar with the constraints of const generics, but I'm not sure of better wording yet. I'll have a think about it.
Rollup of 10 pull requests Successful merges: - rust-lang#76162 (Make duration_since documentation more clear) - rust-lang#76355 (remove public visibility previously needed for rustfmt) - rust-lang#76374 (Improve ayu doc source line number contrast) - rust-lang#76379 (rustbuild: Remove `Mode::Codegen`) - rust-lang#76389 (Fix HashMap visualizers in Visual Studio (Code)) - rust-lang#76396 (Fix typo in tracking issue template) - rust-lang#76401 (Add help note to unconstrained const parameter) - rust-lang#76402 (Update linker-plugin-lto.md to contain up to rust 1.46) - rust-lang#76403 (Fix documentation for TyCtxt::all_impls) - rust-lang#76498 (Update cargo) Failed merges: - rust-lang#76458 (Add drain_filter method to HashMap and HashSet) r? `@ghost`
Resolves #68366, since it is currently intended behaviour.
If demonstrating
T -> U
is injective, there should be an additional word that it is not yet supported.r? @lcnr