You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0412]: cannot find type `T` in this scope
--> src/lib.rs:8:19
|
8 | struct A<T:Float>(T);
| ^ did you mean `A`?
error[E0243]: wrong number of type arguments: expected 1, found 0
--> src/lib.rs:8:8
|
8 | struct A<T:Float>(T);
| ^ expected 1 type argument
error: aborting due to 2 previous errors
Instead, it should:
impl<T:Float>FloatforA<T>{...}
Yes, that should work.
We should see if there are other derive crates we can use as an example of how to produce generic args and constraints properly.
Here,
float
will try to implement Float forT
, butT
is a parameter.Instead, it should:
The text was updated successfully, but these errors were encountered: