Skip to content

The note about missing implementation is absent for some operators #50151

Closed
@dzamlo

Description

@dzamlo

If you try to use an operator on a type that doesn't implement it, the error include an note similar to this one:

note: an implementation of `std::ops::Add` might be missing for `Foo`

But for three operator, this note is missing:

  • ^, BitXor
  • -, Neg (the unary negation)
  • !, Not

This note is also missing for all the *Assign version of the operators.

I've made a minimal example with the playground:
https://play.rust-lang.org/?gist=1df2a3964559faed35efb8427d9c3608&version=nightly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions