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
The current impl of the generic fn requires all args to be signed types (impl Neg). This isn't ergonomic at all.
However, I have no idea how to define a trait-bound that forbids a specific trait. In this case, the new fn must forbid any type that impls the Neg trait, to guarantee it'll be unsigned, and therefore no need for abs
The text was updated successfully, but these errors were encountered:
The current impl of the generic
fn
requires all args to be signed types (impl Neg
). This isn't ergonomic at all.However, I have no idea how to define a trait-bound that forbids a specific trait. In this case, the new
fn
must forbid any type that impls theNeg
trait, to guarantee it'll be unsigned, and therefore no need forabs
The text was updated successfully, but these errors were encountered: