-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Bad diagnostics from RPITIT #101662
Comments
@rustbot label F-return_position_impl_trait_in_trait |
The span is fixed by #101676:
But, for example, this code: #![feature(return_position_impl_trait_in_trait)]
trait Foo {
fn bar() -> impl std::fmt::Display;
}
impl Foo for () {
fn bar() -> () {}
} Still mentions
I'm not sure if I know a better way of explaining "required by a bound in an RPITIT in |
Maybe we should just say |
Gonna unassign myself this issue because I don't think it's necessarily an issue, or at least I don't know exactly how to solve it in a way that makes me happy yet. I think "required by this bound in |
This now says "required by a bound in |
Given the following code: playground
The current output is:
The problem here is that
(): OnlySized<T> where T: Sized
, but[u8]: !Sized
, therefore(): !OnlySized<[u8]>
The
doesn't have a size known at compile-time
pointing at()
is quite confusing, since(): Sized
.Also the
{opaque#0}
name from the desugaring can be improved as well.The text was updated successfully, but these errors were encountered: