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/condition.rs | |
| 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/condition.rs')
| -rw-r--r-- | src/libstd/condition.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libstd/condition.rs b/src/libstd/condition.rs index c5d6ce2f3df..df5154123f2 100644 --- a/src/libstd/condition.rs +++ b/src/libstd/condition.rs @@ -162,12 +162,12 @@ impl<T, U> Condition<T, U> { /// /// Normally this object is not dealt with directly, but rather it's directly /// used after being returned from `trap` -pub struct Trap<'self, T, U> { - priv cond: &'self Condition<T, U>, +pub struct Trap<'a, T, U> { + priv cond: &'a Condition<T, U>, priv handler: @Handler<T, U> } -impl<'self, T, U> Trap<'self, T, U> { +impl<'a, T, U> Trap<'a, T, U> { /// Execute a block of code with this trap handler's exception handler /// registered. /// @@ -181,7 +181,7 @@ impl<'self, T, U> Trap<'self, T, U> { /// }); /// assert_eq!(result, 7); /// ``` - pub fn inside<V>(&self, inner: 'self || -> V) -> V { + pub fn inside<V>(&self, inner: 'a || -> V) -> V { let _g = Guard { cond: self.cond }; debug!("Trap: pushing handler to TLS"); local_data::set(self.cond.key, self.handler); @@ -191,7 +191,7 @@ impl<'self, T, U> Trap<'self, T, U> { /// Returns a guard that will automatically reset the condition upon /// exit of the scope. This is useful if you want to use conditions with /// an RAII pattern. - pub fn guard(&self) -> Guard<'self,T,U> { + pub fn guard(&self) -> Guard<'a,T,U> { let guard = Guard { cond: self.cond }; @@ -204,12 +204,12 @@ impl<'self, T, U> Trap<'self, T, U> { /// A guard that will automatically reset the condition handler upon exit of /// the scope. This is useful if you want to use conditions with an RAII /// pattern. -pub struct Guard<'self, T, U> { - priv cond: &'self Condition<T, U> +pub struct Guard<'a, T, U> { + priv cond: &'a Condition<T, U> } #[unsafe_destructor] -impl<'self, T, U> Drop for Guard<'self, T, U> { +impl<'a, T, U> Drop for Guard<'a, T, U> { fn drop(&mut self) { debug!("Guard: popping handler from TLS"); let curr = local_data::pop(self.cond.key); |
