-
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 support for relating slices in super_relate_consts
#64858
Conversation
cc @yodaldevoid, who looked into the issue previously — you might have some thoughts. |
Thanks @Skinny121, this looks good! @bors r+ |
📌 Commit 5cb0039 has been approved by |
Good job fixing this! I don't know if you went through all of the const generics issues, but this might fix a couple more than you noted. |
@yodaldevoid I think this PR only fixes the two cases I mentioned. #63322, #62579, and #62395 are similar but are for different types than strings/slices. |
LL | let _: ConstString<"Hello"> = ConstString::<"World">; | ||
| ^^^^^^^^^^^^^^^^^^^^^^ expected `"Hello"`, found `"World"` | ||
| | ||
= note: expected type `ConstString<>` |
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.
btw @varkor, this is a rather unfortunate diagnostic... do we have an issue for that?
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.
There is a case for it: #61395.
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.
Ah excellent, thanks!
@bors r+ |
📌 Commit 54bad93 has been approved by |
Add support for relating slices in `super_relate_consts` This allows passing strings as generic arguments. Fixes rust-lang#63773 Fixes rust-lang#60813 r? @varkor
Add support for relating slices in `super_relate_consts` This allows passing strings as generic arguments. Fixes rust-lang#63773 Fixes rust-lang#60813 r? @varkor
Rollup of 6 pull requests Successful merges: - #64691 (Point at definition when misusing ADT) - #64735 (Add long error explanation for E0533) - #64825 (Point at enclosing match when expecting `()` in arm) - #64858 (Add support for relating slices in `super_relate_consts`) - #64894 (syntax: fix dropping of attribute on first param of non-method assocated fn) - #64898 (fixed typo) Failed merges: r? @ghost
This allows passing strings as generic arguments.
Fixes #63773
Fixes #60813
r? @varkor