From 3ead4a16b54436867555ced38e91b35fb48afcb7 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 24 Apr 2017 21:29:26 -0700 Subject: [PATCH] Implement RefNum more generically --- traits/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/traits/src/lib.rs b/traits/src/lib.rs index f4dbee2..41422c8 100644 --- a/traits/src/lib.rs +++ b/traits/src/lib.rs @@ -89,9 +89,9 @@ impl NumRef for T where T: Num + for<'r> NumOps<&'r T> {} /// The trait for references which implement numeric operations, taking the /// second operand either by value or by reference. /// -/// This is automatically implemented for all `&T` implementing the operators. +/// This is automatically implemented for types which implement the operators. pub trait RefNum: NumOps + for<'r> NumOps<&'r Base, Base> {} -impl<'a, T> RefNum for &'a T where &'a T: NumOps + for<'r> NumOps<&'r T, T> {} +impl RefNum for T where T: NumOps + for<'r> NumOps<&'r Base, Base> {} /// The trait for types implementing numeric assignment operators (like `+=`). ///