Skip to content

the trait core::ops::Add<()> is not implemented for i32 #39579

Closed
@beamspease

Description

@beamspease

This error message was confusing to me - at first glance, it seems like it's saying that the add operator isn't implemented for the basic integer type, which makes no sense.

I'm not sure if this would look correct for all generics, but I think it would have made more sense to me if this error message were reversed - the trait 'i32::core::ops::Add' is not implemented for '<()>'.

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