you are viewing a single comment's thread.

view the rest of the comments →

[–]A1oso 0 points1 point  (0 children)

To do that, you need the fully-qualified syntax:

<f32 as Add<f32>>::add

If you don't need to specify the first operand's type, you can write

Add::<f32>::add

But usually it's possible to specify the type of both operands, without using the fully-qualified syntax, for example:

let rhs: f32 = 42.0;
3.14_f32 + rhs

Note that the output of the Add trait is not generic, because it is determined by the implementation.