name anonymous fn parameters in libcore traits
This commit is contained in:
parent
e7fc53b8f0
commit
e626a6807c
@ -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,
|
||||
|
@ -1324,7 +1324,7 @@ shr_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize }
|
||||
pub trait AddAssign<Rhs=Self> {
|
||||
/// 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<Rhs=Self> {
|
||||
/// 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<Rhs=Self> {
|
||||
/// 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<Rhs=Self> {
|
||||
/// 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<Rhs=Self> {
|
||||
/// 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<Rhs=Self> {
|
||||
/// 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<Rhs=Self> {
|
||||
/// 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<Rhs=Self> {
|
||||
/// 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<Rhs> {
|
||||
/// 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<Rhs=Self> {
|
||||
/// 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 {
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user