Closed
Description
struct Animal;
impl &Animal {}
error[E0118]: no base type found for inherent implementation
--> src/lib.rs:3:6
|
3 | impl &Animal {}
| ^^^^^^^ impl requires a base type
|
= note: either implement a trait on it or create a newtype to wrap it instead
To quote GIGAOTSOS:
impl requeres a base type error screams about presence of sybtyping
This should probably use the covered/local terminology from re-rebalancing coherence instead of "base type" to avoid the problematic overlap with subtyping/inheritance terminology.
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsCategory: An issue proposing an enhancement or a PR with one.Diagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint; hard to understand for new users.Relevant to the compiler team, which will review and decide on the PR/issue.