diff options
| author | bors <bors@rust-lang.org> | 2013-12-11 12:56:22 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-12-11 12:56:22 -0800 |
| commit | 1b12dca7f97a51c6cbb4f47ea6e095d841a97c1a (patch) | |
| tree | 19f1a66a4ced0e180c4fa1720ecfe53b14e92465 /src/libstd/path | |
| parent | 47d10c745ebcc31768e98083c8c6d5396f4edcdb (diff) | |
| parent | 5731ca3078318a66a13208133d8839a9f9f92629 (diff) | |
| download | rust-1b12dca7f97a51c6cbb4f47ea6e095d841a97c1a.tar.gz rust-1b12dca7f97a51c6cbb4f47ea6e095d841a97c1a.zip | |
auto merge of #10897 : boredomist/rust/remove-self-lifetime, r=brson
Also remove all instances of 'self within the codebase. This fixes #10889. To make reviewing easier the following files were modified with more than a dumb text replacement: - `src/test/compile-fail/lifetime-no-keyword.rs` - `src/test/compile-fail/lifetime-obsoleted-self.rs` - `src/test/compile-fail/regions-free-region-ordering-incorrect.rs` - `src/libsyntax/parse/lexer.rs`
Diffstat (limited to 'src/libstd/path')
| -rw-r--r-- | src/libstd/path/mod.rs | 16 | ||||
| -rw-r--r-- | src/libstd/path/posix.rs | 14 | ||||
| -rw-r--r-- | src/libstd/path/windows.rs | 20 |
3 files changed, 25 insertions, 25 deletions
diff --git a/src/libstd/path/mod.rs b/src/libstd/path/mod.rs index 303bb470991..53948dc8309 100644 --- a/src/libstd/path/mod.rs +++ b/src/libstd/path/mod.rs @@ -523,18 +523,18 @@ pub trait GenericPathUnsafe { } /// Helper struct for printing paths with format!() -pub struct Display<'self, P> { - priv path: &'self P, +pub struct Display<'a, P> { + priv path: &'a P, priv filename: bool } -impl<'self, P: GenericPath> fmt::Default for Display<'self, P> { +impl<'a, P: GenericPath> fmt::Default for Display<'a, P> { fn fmt(d: &Display<P>, f: &mut fmt::Formatter) { d.with_str(|s| f.pad(s)) } } -impl<'self, P: GenericPath> ToStr for Display<'self, P> { +impl<'a, P: GenericPath> ToStr for Display<'a, P> { /// Returns the path as a string /// /// If the path is not UTF-8, invalid sequences with be replaced with the @@ -551,7 +551,7 @@ impl<'self, P: GenericPath> ToStr for Display<'self, P> { } } -impl<'self, P: GenericPath> Display<'self, P> { +impl<'a, P: GenericPath> Display<'a, P> { /// Provides the path as a string to a closure /// /// If the path is not UTF-8, invalid sequences will be replaced with the @@ -570,7 +570,7 @@ impl<'self, P: GenericPath> Display<'self, P> { } } -impl<'self> BytesContainer for &'self str { +impl<'a> BytesContainer for &'a str { #[inline] fn container_as_bytes<'a>(&'a self) -> &'a [u8] { self.as_bytes() @@ -584,7 +584,7 @@ impl<'self> BytesContainer for &'self str { Some(*self) } #[inline] - fn is_str(_: Option<&'self str>) -> bool { true } + fn is_str(_: Option<&'a str>) -> bool { true } } impl BytesContainer for ~str { @@ -625,7 +625,7 @@ impl BytesContainer for @str { fn is_str(_: Option<@str>) -> bool { true } } -impl<'self> BytesContainer for &'self [u8] { +impl<'a> BytesContainer for &'a [u8] { #[inline] fn container_as_bytes<'a>(&'a self) -> &'a [u8] { *self diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs index 10ce06f7e03..3f2535765dd 100644 --- a/src/libstd/path/posix.rs +++ b/src/libstd/path/posix.rs @@ -25,16 +25,16 @@ use vec::{CopyableVector, RSplitIterator, SplitIterator, Vector, VectorVector}; use super::{BytesContainer, GenericPath, GenericPathUnsafe}; /// Iterator that yields successive components of a Path as &[u8] -pub type ComponentIter<'self> = SplitIterator<'self, u8>; +pub type ComponentIter<'a> = SplitIterator<'a, u8>; /// Iterator that yields components of a Path in reverse as &[u8] -pub type RevComponentIter<'self> = RSplitIterator<'self, u8>; +pub type RevComponentIter<'a> = RSplitIterator<'a, u8>; /// Iterator that yields successive components of a Path as Option<&str> -pub type StrComponentIter<'self> = Map<'self, &'self [u8], Option<&'self str>, - ComponentIter<'self>>; +pub type StrComponentIter<'a> = Map<'a, &'a [u8], Option<&'a str>, + ComponentIter<'a>>; /// Iterator that yields components of a Path in reverse as Option<&str> -pub type RevStrComponentIter<'self> = Map<'self, &'self [u8], Option<&'self str>, - RevComponentIter<'self>>; +pub type RevStrComponentIter<'a> = Map<'a, &'a [u8], Option<&'a str>, + RevComponentIter<'a>>; /// Represents a POSIX file path #[deriving(Clone, DeepClone)] @@ -103,7 +103,7 @@ impl BytesContainer for Path { } } -impl<'self> BytesContainer for &'self Path { +impl<'a> BytesContainer for &'a Path { #[inline] fn container_as_bytes<'a>(&'a self) -> &'a [u8] { self.as_vec() diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index b7a0d685f12..114f675cdba 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -27,21 +27,21 @@ use super::{contains_nul, BytesContainer, GenericPath, GenericPathUnsafe}; /// /// Each component is yielded as Option<&str> for compatibility with PosixPath, but /// every component in WindowsPath is guaranteed to be Some. -pub type StrComponentIter<'self> = Map<'self, &'self str, Option<&'self str>, - CharSplitIterator<'self, char>>; +pub type StrComponentIter<'a> = Map<'a, &'a str, Option<&'a str>, + CharSplitIterator<'a, char>>; /// Iterator that yields components of a Path in reverse as &str /// /// Each component is yielded as Option<&str> for compatibility with PosixPath, but /// every component in WindowsPath is guaranteed to be Some. -pub type RevStrComponentIter<'self> = Invert<Map<'self, &'self str, Option<&'self str>, - CharSplitIterator<'self, char>>>; +pub type RevStrComponentIter<'a> = Invert<Map<'a, &'a str, Option<&'a str>, + CharSplitIterator<'a, char>>>; /// Iterator that yields successive components of a Path as &[u8] -pub type ComponentIter<'self> = Map<'self, Option<&'self str>, &'self [u8], - StrComponentIter<'self>>; +pub type ComponentIter<'a> = Map<'a, Option<&'a str>, &'a [u8], + StrComponentIter<'a>>; /// Iterator that yields components of a Path in reverse as &[u8] -pub type RevComponentIter<'self> = Map<'self, Option<&'self str>, &'self [u8], - RevStrComponentIter<'self>>; +pub type RevComponentIter<'a> = Map<'a, Option<&'a str>, &'a [u8], + RevStrComponentIter<'a>>; /// Represents a Windows path // Notes for Windows path impl: @@ -138,7 +138,7 @@ impl BytesContainer for Path { fn is_str(_: Option<Path>) -> bool { true } } -impl<'self> BytesContainer for &'self Path { +impl<'a> BytesContainer for &'a Path { #[inline] fn container_as_bytes<'a>(&'a self) -> &'a [u8] { self.as_vec() @@ -152,7 +152,7 @@ impl<'self> BytesContainer for &'self Path { self.as_str() } #[inline] - fn is_str(_: Option<&'self Path>) -> bool { true } + fn is_str(_: Option<&'a Path>) -> bool { true } } impl GenericPathUnsafe for Path { |
