Skip to content

impl Undefined {} gives impl coherence error, not unresolved name #18058

Closed
@huonw

Description

@huonw
impl Undefined {}

fn main() {}
<anon>:1:6: 1:15 error: inherent implementations are not allowed for types not defined in the current module.
<anon>:1 impl Undefined {}
              ^~~~~~~~~

This should say error: use of undeclared type name Undefined`` like fn foo() -> Undefined {} does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions