-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Impling a trait on T fails to make it accessable for generic types. #6898
Labels
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Comments
This is not using associated fns as intended by the current implementation. I think the way to implement this would be:
|
Ah, that's odd. Because |
This now compiles and runs correctly. Needstest |
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Mar 25, 2021
…-fn, r=giraffate Fix false-positive `manual_unwrap_or` inside const fn Fixes rust-lang#6898 changelog: Fix false-positive for manual_unwrap_or in const fn.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Consider the following code:
I get the error:
Commenting out the
size_of
function, I then get this:I would have assumed that seeing as type
T
affects all types you would be able to use the impled methods even if there was no type constraint specified.The text was updated successfully, but these errors were encountered: