Skip to content

Commit e626a68

Browse files
committed
name anonymous fn parameters in libcore traits
1 parent e7fc53b commit e626a68

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

src/libcore/fmt/mod.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ impl<'a> Display for Arguments<'a> {
434434
pub trait Debug {
435435
/// Formats the value using the given formatter.
436436
#[stable(feature = "rust1", since = "1.0.0")]
437-
fn fmt(&self, &mut Formatter) -> Result;
437+
fn fmt(&self, f: &mut Formatter) -> Result;
438438
}
439439

440440
/// Format trait for an empty format, `{}`.
@@ -477,7 +477,7 @@ pub trait Debug {
477477
pub trait Display {
478478
/// Formats the value using the given formatter.
479479
#[stable(feature = "rust1", since = "1.0.0")]
480-
fn fmt(&self, &mut Formatter) -> Result;
480+
fn fmt(&self, f: &mut Formatter) -> Result;
481481
}
482482

483483
/// Format trait for the `o` character.
@@ -524,7 +524,7 @@ pub trait Display {
524524
pub trait Octal {
525525
/// Formats the value using the given formatter.
526526
#[stable(feature = "rust1", since = "1.0.0")]
527-
fn fmt(&self, &mut Formatter) -> Result;
527+
fn fmt(&self, f: &mut Formatter) -> Result;
528528
}
529529

530530
/// Format trait for the `b` character.
@@ -571,7 +571,7 @@ pub trait Octal {
571571
pub trait Binary {
572572
/// Formats the value using the given formatter.
573573
#[stable(feature = "rust1", since = "1.0.0")]
574-
fn fmt(&self, &mut Formatter) -> Result;
574+
fn fmt(&self, f: &mut Formatter) -> Result;
575575
}
576576

577577
/// Format trait for the `x` character.
@@ -619,7 +619,7 @@ pub trait Binary {
619619
pub trait LowerHex {
620620
/// Formats the value using the given formatter.
621621
#[stable(feature = "rust1", since = "1.0.0")]
622-
fn fmt(&self, &mut Formatter) -> Result;
622+
fn fmt(&self, f: &mut Formatter) -> Result;
623623
}
624624

625625
/// Format trait for the `X` character.
@@ -667,7 +667,7 @@ pub trait LowerHex {
667667
pub trait UpperHex {
668668
/// Formats the value using the given formatter.
669669
#[stable(feature = "rust1", since = "1.0.0")]
670-
fn fmt(&self, &mut Formatter) -> Result;
670+
fn fmt(&self, f: &mut Formatter) -> Result;
671671
}
672672

673673
/// Format trait for the `p` character.
@@ -712,7 +712,7 @@ pub trait UpperHex {
712712
pub trait Pointer {
713713
/// Formats the value using the given formatter.
714714
#[stable(feature = "rust1", since = "1.0.0")]
715-
fn fmt(&self, &mut Formatter) -> Result;
715+
fn fmt(&self, f: &mut Formatter) -> Result;
716716
}
717717

718718
/// Format trait for the `e` character.
@@ -755,7 +755,7 @@ pub trait Pointer {
755755
pub trait LowerExp {
756756
/// Formats the value using the given formatter.
757757
#[stable(feature = "rust1", since = "1.0.0")]
758-
fn fmt(&self, &mut Formatter) -> Result;
758+
fn fmt(&self, f: &mut Formatter) -> Result;
759759
}
760760

761761
/// Format trait for the `E` character.
@@ -798,7 +798,7 @@ pub trait LowerExp {
798798
pub trait UpperExp {
799799
/// Formats the value using the given formatter.
800800
#[stable(feature = "rust1", since = "1.0.0")]
801-
fn fmt(&self, &mut Formatter) -> Result;
801+
fn fmt(&self, f: &mut Formatter) -> Result;
802802
}
803803

804804
/// The `write` function takes an output stream, a precompiled format string,

src/libcore/ops.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,7 @@ shr_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize }
13241324
pub trait AddAssign<Rhs=Self> {
13251325
/// The method for the `+=` operator
13261326
#[stable(feature = "op_assign_traits", since = "1.8.0")]
1327-
fn add_assign(&mut self, Rhs);
1327+
fn add_assign(&mut self, rhs: Rhs);
13281328
}
13291329

13301330
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 }
13801380
pub trait SubAssign<Rhs=Self> {
13811381
/// The method for the `-=` operator
13821382
#[stable(feature = "op_assign_traits", since = "1.8.0")]
1383-
fn sub_assign(&mut self, Rhs);
1383+
fn sub_assign(&mut self, rhs: Rhs);
13841384
}
13851385

13861386
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 }
14251425
pub trait MulAssign<Rhs=Self> {
14261426
/// The method for the `*=` operator
14271427
#[stable(feature = "op_assign_traits", since = "1.8.0")]
1428-
fn mul_assign(&mut self, Rhs);
1428+
fn mul_assign(&mut self, rhs: Rhs);
14291429
}
14301430

14311431
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 }
14701470
pub trait DivAssign<Rhs=Self> {
14711471
/// The method for the `/=` operator
14721472
#[stable(feature = "op_assign_traits", since = "1.8.0")]
1473-
fn div_assign(&mut self, Rhs);
1473+
fn div_assign(&mut self, rhs: Rhs);
14741474
}
14751475

14761476
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 }
15141514
pub trait RemAssign<Rhs=Self> {
15151515
/// The method for the `%=` operator
15161516
#[stable(feature = "op_assign_traits", since = "1.8.0")]
1517-
fn rem_assign(&mut self, Rhs);
1517+
fn rem_assign(&mut self, rhs: Rhs);
15181518
}
15191519

15201520
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 }
16001600
pub trait BitAndAssign<Rhs=Self> {
16011601
/// The method for the `&=` operator
16021602
#[stable(feature = "op_assign_traits", since = "1.8.0")]
1603-
fn bitand_assign(&mut self, Rhs);
1603+
fn bitand_assign(&mut self, rhs: Rhs);
16041604
}
16051605

16061606
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 }
16441644
pub trait BitOrAssign<Rhs=Self> {
16451645
/// The method for the `|=` operator
16461646
#[stable(feature = "op_assign_traits", since = "1.8.0")]
1647-
fn bitor_assign(&mut self, Rhs);
1647+
fn bitor_assign(&mut self, rhs: Rhs);
16481648
}
16491649

16501650
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 }
16881688
pub trait BitXorAssign<Rhs=Self> {
16891689
/// The method for the `^=` operator
16901690
#[stable(feature = "op_assign_traits", since = "1.8.0")]
1691-
fn bitxor_assign(&mut self, Rhs);
1691+
fn bitxor_assign(&mut self, rhs: Rhs);
16921692
}
16931693

16941694
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 }
17321732
pub trait ShlAssign<Rhs> {
17331733
/// The method for the `<<=` operator
17341734
#[stable(feature = "op_assign_traits", since = "1.8.0")]
1735-
fn shl_assign(&mut self, Rhs);
1735+
fn shl_assign(&mut self, rhs: Rhs);
17361736
}
17371737

17381738
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 }
17971797
pub trait ShrAssign<Rhs=Self> {
17981798
/// The method for the `>>=` operator
17991799
#[stable(feature = "op_assign_traits", since = "1.8.0")]
1800-
fn shr_assign(&mut self, Rhs);
1800+
fn shr_assign(&mut self, rhs: Rhs);
18011801
}
18021802

18031803
macro_rules! shr_assign_impl {

src/libcore/str/pattern.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ pub trait DoubleEndedSearcher<'a>: ReverseSearcher<'a> {}
240240

241241
#[doc(hidden)]
242242
trait CharEq {
243-
fn matches(&mut self, char) -> bool;
243+
fn matches(&mut self, c: char) -> bool;
244244
fn only_ascii(&self) -> bool;
245245
}
246246

@@ -1178,8 +1178,8 @@ impl TwoWaySearcher {
11781178
trait TwoWayStrategy {
11791179
type Output;
11801180
fn use_early_reject() -> bool;
1181-
fn rejecting(usize, usize) -> Self::Output;
1182-
fn matching(usize, usize) -> Self::Output;
1181+
fn rejecting(a: usize, b: usize) -> Self::Output;
1182+
fn matching(a: usize, b: usize) -> Self::Output;
11831183
}
11841184

11851185
/// Skip to match intervals as quickly as possible

0 commit comments

Comments
 (0)