diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index eb086c201812a..6c48c29ecd151 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -434,7 +434,7 @@ impl<'a> Display for Arguments<'a> { pub trait Debug { /// Formats the value using the given formatter. #[stable(feature = "rust1", since = "1.0.0")] - fn fmt(&self, &mut Formatter) -> Result; + fn fmt(&self, f: &mut Formatter) -> Result; } /// Format trait for an empty format, `{}`. @@ -477,7 +477,7 @@ pub trait Debug { pub trait Display { /// Formats the value using the given formatter. #[stable(feature = "rust1", since = "1.0.0")] - fn fmt(&self, &mut Formatter) -> Result; + fn fmt(&self, f: &mut Formatter) -> Result; } /// Format trait for the `o` character. @@ -524,7 +524,7 @@ pub trait Display { pub trait Octal { /// Formats the value using the given formatter. #[stable(feature = "rust1", since = "1.0.0")] - fn fmt(&self, &mut Formatter) -> Result; + fn fmt(&self, f: &mut Formatter) -> Result; } /// Format trait for the `b` character. @@ -571,7 +571,7 @@ pub trait Octal { pub trait Binary { /// Formats the value using the given formatter. #[stable(feature = "rust1", since = "1.0.0")] - fn fmt(&self, &mut Formatter) -> Result; + fn fmt(&self, f: &mut Formatter) -> Result; } /// Format trait for the `x` character. @@ -619,7 +619,7 @@ pub trait Binary { pub trait LowerHex { /// Formats the value using the given formatter. #[stable(feature = "rust1", since = "1.0.0")] - fn fmt(&self, &mut Formatter) -> Result; + fn fmt(&self, f: &mut Formatter) -> Result; } /// Format trait for the `X` character. @@ -667,7 +667,7 @@ pub trait LowerHex { pub trait UpperHex { /// Formats the value using the given formatter. #[stable(feature = "rust1", since = "1.0.0")] - fn fmt(&self, &mut Formatter) -> Result; + fn fmt(&self, f: &mut Formatter) -> Result; } /// Format trait for the `p` character. @@ -712,7 +712,7 @@ pub trait UpperHex { pub trait Pointer { /// Formats the value using the given formatter. #[stable(feature = "rust1", since = "1.0.0")] - fn fmt(&self, &mut Formatter) -> Result; + fn fmt(&self, f: &mut Formatter) -> Result; } /// Format trait for the `e` character. @@ -755,7 +755,7 @@ pub trait Pointer { pub trait LowerExp { /// Formats the value using the given formatter. #[stable(feature = "rust1", since = "1.0.0")] - fn fmt(&self, &mut Formatter) -> Result; + fn fmt(&self, f: &mut Formatter) -> Result; } /// Format trait for the `E` character. @@ -798,7 +798,7 @@ pub trait LowerExp { pub trait UpperExp { /// Formats the value using the given formatter. #[stable(feature = "rust1", since = "1.0.0")] - fn fmt(&self, &mut Formatter) -> Result; + fn fmt(&self, f: &mut Formatter) -> Result; } /// The `write` function takes an output stream, a precompiled format string, diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index 566fb89365a51..59bcb340ec99a 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -1324,7 +1324,7 @@ shr_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize } pub trait AddAssign { /// The method for the `+=` operator #[stable(feature = "op_assign_traits", since = "1.8.0")] - fn add_assign(&mut self, Rhs); + fn add_assign(&mut self, rhs: Rhs); } macro_rules! add_assign_impl { @@ -1380,7 +1380,7 @@ add_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 } pub trait SubAssign { /// The method for the `-=` operator #[stable(feature = "op_assign_traits", since = "1.8.0")] - fn sub_assign(&mut self, Rhs); + fn sub_assign(&mut self, rhs: Rhs); } macro_rules! sub_assign_impl { @@ -1425,7 +1425,7 @@ sub_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 } pub trait MulAssign { /// The method for the `*=` operator #[stable(feature = "op_assign_traits", since = "1.8.0")] - fn mul_assign(&mut self, Rhs); + fn mul_assign(&mut self, rhs: Rhs); } macro_rules! mul_assign_impl { @@ -1470,7 +1470,7 @@ mul_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 } pub trait DivAssign { /// The method for the `/=` operator #[stable(feature = "op_assign_traits", since = "1.8.0")] - fn div_assign(&mut self, Rhs); + fn div_assign(&mut self, rhs: Rhs); } macro_rules! div_assign_impl { @@ -1514,7 +1514,7 @@ div_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 } pub trait RemAssign { /// The method for the `%=` operator #[stable(feature = "op_assign_traits", since = "1.8.0")] - fn rem_assign(&mut self, Rhs); + fn rem_assign(&mut self, rhs: Rhs); } macro_rules! rem_assign_impl { @@ -1600,7 +1600,7 @@ rem_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 } pub trait BitAndAssign { /// The method for the `&=` operator #[stable(feature = "op_assign_traits", since = "1.8.0")] - fn bitand_assign(&mut self, Rhs); + fn bitand_assign(&mut self, rhs: Rhs); } macro_rules! bitand_assign_impl { @@ -1644,7 +1644,7 @@ bitand_assign_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 } pub trait BitOrAssign { /// The method for the `|=` operator #[stable(feature = "op_assign_traits", since = "1.8.0")] - fn bitor_assign(&mut self, Rhs); + fn bitor_assign(&mut self, rhs: Rhs); } macro_rules! bitor_assign_impl { @@ -1688,7 +1688,7 @@ bitor_assign_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 } pub trait BitXorAssign { /// The method for the `^=` operator #[stable(feature = "op_assign_traits", since = "1.8.0")] - fn bitxor_assign(&mut self, Rhs); + fn bitxor_assign(&mut self, rhs: Rhs); } macro_rules! bitxor_assign_impl { @@ -1732,7 +1732,7 @@ bitxor_assign_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 } pub trait ShlAssign { /// The method for the `<<=` operator #[stable(feature = "op_assign_traits", since = "1.8.0")] - fn shl_assign(&mut self, Rhs); + fn shl_assign(&mut self, rhs: Rhs); } macro_rules! shl_assign_impl { @@ -1797,7 +1797,7 @@ shl_assign_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize } pub trait ShrAssign { /// The method for the `>>=` operator #[stable(feature = "op_assign_traits", since = "1.8.0")] - fn shr_assign(&mut self, Rhs); + fn shr_assign(&mut self, rhs: Rhs); } macro_rules! shr_assign_impl { diff --git a/src/libcore/str/pattern.rs b/src/libcore/str/pattern.rs index 7dced2ba7514c..8493afe98bc57 100644 --- a/src/libcore/str/pattern.rs +++ b/src/libcore/str/pattern.rs @@ -240,7 +240,7 @@ pub trait DoubleEndedSearcher<'a>: ReverseSearcher<'a> {} #[doc(hidden)] trait CharEq { - fn matches(&mut self, char) -> bool; + fn matches(&mut self, c: char) -> bool; fn only_ascii(&self) -> bool; } @@ -1178,8 +1178,8 @@ impl TwoWaySearcher { trait TwoWayStrategy { type Output; fn use_early_reject() -> bool; - fn rejecting(usize, usize) -> Self::Output; - fn matching(usize, usize) -> Self::Output; + fn rejecting(a: usize, b: usize) -> Self::Output; + fn matching(a: usize, b: usize) -> Self::Output; } /// Skip to match intervals as quickly as possible