diff options
Diffstat (limited to 'src/libstd/fmt/mod.rs')
| -rw-r--r-- | src/libstd/fmt/mod.rs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/libstd/fmt/mod.rs b/src/libstd/fmt/mod.rs index 463540b3677..a98a110ac3b 100644 --- a/src/libstd/fmt/mod.rs +++ b/src/libstd/fmt/mod.rs @@ -476,7 +476,7 @@ pub mod rt; /// A struct to represent both where to emit formatting strings to and how they /// should be formatted. A mutable version of this is passed to all formatting /// traits. -pub struct Formatter<'self> { +pub struct Formatter<'a> { /// Flags for formatting (packed version of rt::Flag) flags: uint, /// Character used as 'fill' whenever there is alignment @@ -489,21 +489,21 @@ pub struct Formatter<'self> { precision: Option<uint>, /// Output buffer. - buf: &'self mut io::Writer, - priv curarg: vec::VecIterator<'self, Argument<'self>>, - priv args: &'self [Argument<'self>], + buf: &'a mut io::Writer, + priv curarg: vec::VecIterator<'a, Argument<'a>>, + priv args: &'a [Argument<'a>], } /// This struct represents the generic "argument" which is taken by the Xprintf /// family of functions. It contains a function to format the given value. At /// compile time it is ensured that the function and the value have the correct /// types, and then this struct is used to canonicalize arguments to one type. -pub struct Argument<'self> { +pub struct Argument<'a> { priv formatter: extern "Rust" fn(&util::Void, &mut Formatter), - priv value: &'self util::Void, + priv value: &'a util::Void, } -impl<'self> Arguments<'self> { +impl<'a> Arguments<'a> { /// When using the format_args!() macro, this function is used to generate the /// Arguments structure. The compiler inserts an `unsafe` block to call this, /// which is valid because the compiler performs all necessary validation to @@ -524,9 +524,9 @@ impl<'self> Arguments<'self> { /// and pass it to a user-supplied function. The macro validates the format /// string at compile-time so usage of the `write` and `format` functions can /// be safely performed. -pub struct Arguments<'self> { - priv fmt: &'self [rt::Piece<'self>], - priv args: &'self [Argument<'self>], +pub struct Arguments<'a> { + priv fmt: &'a [rt::Piece<'a>], + priv args: &'a [Argument<'a>], } /// When a format is not otherwise specified, types are formatted by ascribing @@ -684,7 +684,7 @@ pub unsafe fn format_unsafe(fmt: &[rt::Piece], args: &[Argument]) -> ~str { return str::from_utf8_owned(output.inner()); } -impl<'self> Formatter<'self> { +impl<'a> Formatter<'a> { // First up is the collection of functions used to execute a format string // at runtime. This consumes all of the compile-time statics generated by @@ -988,7 +988,7 @@ impl Bool for bool { } } -impl<'self, T: str::Str> String for T { +impl<'a, T: str::Str> String for T { fn fmt(s: &T, f: &mut Formatter) { f.pad(s.as_slice()); } @@ -1111,7 +1111,7 @@ impl<T> Pointer for *mut T { // Implementation of Default for various core types macro_rules! delegate(($ty:ty to $other:ident) => { - impl<'self> Default for $ty { + impl<'a> Default for $ty { fn fmt(me: &$ty, f: &mut Formatter) { $other::fmt(me, f) } @@ -1129,7 +1129,7 @@ delegate!( u32 to Unsigned) delegate!( u64 to Unsigned) delegate!(@str to String) delegate!(~str to String) -delegate!(&'self str to String) +delegate!(&'a str to String) delegate!(bool to Bool) delegate!(char to Char) delegate!(f32 to Float) |
