-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Fix E0118 #31347
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
Fix E0118 #31347
Conversation
|
||
``` | ||
impl SomeTypeThatDoesntExist { } | ||
type NineString = &'static [char]; |
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.
The type alias seems superfluous, and it's irrelevant to the error itself.
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'll also say that you can't implement a type which isn't defined in the current crate.
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.
Type aliases don't change the situation at all, they're just confusing here since it seems like you're suggesting them as a solution even if they won't work.
cc @Manishearth |
171f3c0
to
994ed2a
Compare
"no base type found for inherent implementation; \ | ||
implement a trait or new type instead"); | ||
"no base type found for inherent implementation; either \ | ||
implement a trait on it or create a newtype to wrap it \ |
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.
the stuff after the semicolon should be in a help
994ed2a
to
3446898
Compare
"no base type found for inherent implementation; \ | ||
implement a trait or new type instead"); | ||
"no base type found for inherent implementation;"); | ||
span_help!(self.tcx.sess, item.span, |
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.
The two should be linked using struct_span_err.
3446898
to
db63a55
Compare
Updated. |
@bors r+ |
📌 Commit db63a55 has been approved by |
r? @eddyb