-
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
E0277: suggest ?Sized
to relax implicit Sized
bound on associated types
#85378
Comments
@rustbot label +A-associated-items +A-traits +A-typesystem +D-papercut +D-terse |
I'm working on a pull request for this issue. @rustbot claim |
@tlyu Oh! Very sorry, if you spent too much time on this already, but I have done some work around this already in #85947. If you want, you can take over it and bring it to completion, there are some cases, like #85799 (comment) that still need to be addressed and I haven't yet figured out. Alternatively, if you can find a way to accomplish the same result without touching the |
I've pushed what I have so far to https://github.com/tlyu/rust/tree/suggest-unsized , sorry if it conflicts with stuff you've already done. If you'd like to take a look at it, that would be great. I'll take a look at what you have as well. There are some issues to be worked out with conflicting suggestions for associated types for |
Suggest relaxing implicit `type Assoc: Sized;` bound Fix rust-lang#85378.
Suggest relaxing implicit `type Assoc: Sized;` bound Fix rust-lang#85378.
Suggest relaxing implicit `type Assoc: Sized;` bound Fix rust-lang#85378.
Rollup merge of rust-lang#116911 - estebank:issue-85378, r=oli-obk Suggest relaxing implicit `type Assoc: Sized;` bound Fix rust-lang#85378.
Given the following code: (playground)
The current output is:
Ideally the output should look like:
A similar error message with an unsized generic type argument does mention the implicit
Sized
bound. (playground) Unfortunately, it also doesn't explain the implicit bound up front in the "required by this bound" text. (It mentions it when suggesting to relax the implicit bound, but I think it would be better to mention it up front as well.)Both error messages could benefit from changing the "required by this bound" text to "required by an implicit
Sized
bound".The text was updated successfully, but these errors were encountered: