Skip to main content

UNARY_MINUS_METHOD

Constant UNARY_MINUS_METHOD 

Source
pub const UNARY_MINUS_METHOD: &str = "neg-";
Expand description

The method name unary minus takes.

- is the one operator with two forms, and both may be defined on one type, so negation cannot share subtraction’s symbol as a method name. Subtraction keeps - and negation takes this, which no identifier and no other operator spells.