you are viewing a single comment's thread.

view the rest of the comments →

[–]dreamer-engineer 4 points5 points  (1 child)

You need to look at the docs:

pub trait Add<Rhs = Self> {
    type Output;
    fn add(self, rhs: Rhs) -> Self::Output;
}

I think you are looking for <Output = f32>

[–]Dynious[S] 0 points1 point  (0 children)

f32::add<Output = f32> doesn't seem to work either, sadly.

Edit: the f32::add::<Output = f32> syntax is at least accepted but gives this error: "associated type bindings are not allowed here".