Skip to content

Commit 68028d5

Browse files
committed
Implement RefNum more generically
1 parent 350f211 commit 68028d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

traits/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ impl<T> NumRef for T where T: Num + for<'r> NumOps<&'r T> {}
8989
/// The trait for references which implement numeric operations, taking the
9090
/// second operand either by value or by reference.
9191
///
92-
/// This is automatically implemented for all `&T` implementing the operators.
92+
/// This is automatically implemented for types which implement the operators.
9393
pub trait RefNum<Base>: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base> {}
94-
impl<'a, T> RefNum<T> for &'a T where &'a T: NumOps<T, T> + for<'r> NumOps<&'r T, T> {}
94+
impl<T, Base> RefNum<Base> for T where T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base> {}
9595

9696
/// The trait for types implementing numeric assignment operators (like `+=`).
9797
///

0 commit comments

Comments
 (0)