Skip to content

E0118 probably shouldn't use the terminology of "base type" #69392

Closed
@CAD97

Description

@CAD97

[playground]

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

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.D-confusingDiagnostics: Confusing error or lint that should be reworked.D-newcomer-roadblockDiagnostics: Confusing error or lint; hard to understand for new users.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions