about summary refs log tree commit diff
path: root/src/libstd/any.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-12-11 12:56:22 -0800
committerbors <bors@rust-lang.org>2013-12-11 12:56:22 -0800
commit1b12dca7f97a51c6cbb4f47ea6e095d841a97c1a (patch)
tree19f1a66a4ced0e180c4fa1720ecfe53b14e92465 /src/libstd/any.rs
parent47d10c745ebcc31768e98083c8c6d5396f4edcdb (diff)
parent5731ca3078318a66a13208133d8839a9f9f92629 (diff)
downloadrust-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/any.rs')
-rw-r--r--src/libstd/any.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libstd/any.rs b/src/libstd/any.rs
index 4133bb1835d..8bce687e245 100644
--- a/src/libstd/any.rs
+++ b/src/libstd/any.rs
@@ -65,16 +65,16 @@ impl<T: 'static> Any for T {
 ///////////////////////////////////////////////////////////////////////////////
 
 /// Extension methods for a referenced `Any` trait object
-pub trait AnyRefExt<'self> {
+pub trait AnyRefExt<'a> {
     /// Returns true if the boxed type is the same as `T`
     fn is<T: 'static>(self) -> bool;
 
     /// Returns some reference to the boxed value if it is of type `T`, or
     /// `None` if it isn't.
-    fn as_ref<T: 'static>(self) -> Option<&'self T>;
+    fn as_ref<T: 'static>(self) -> Option<&'a T>;
 }
 
-impl<'self> AnyRefExt<'self> for &'self Any {
+impl<'a> AnyRefExt<'a> for &'a Any {
     #[inline]
     fn is<T: 'static>(self) -> bool {
         // Get TypeId of the type this function is instantiated with
@@ -88,7 +88,7 @@ impl<'self> AnyRefExt<'self> for &'self Any {
     }
 
     #[inline]
-    fn as_ref<T: 'static>(self) -> Option<&'self T> {
+    fn as_ref<T: 'static>(self) -> Option<&'a T> {
         if self.is::<T>() {
             Some(unsafe { transmute(self.as_void_ptr()) })
         } else {
@@ -98,15 +98,15 @@ impl<'self> AnyRefExt<'self> for &'self Any {
 }
 
 /// Extension methods for a mutable referenced `Any` trait object
-pub trait AnyMutRefExt<'self> {
+pub trait AnyMutRefExt<'a> {
     /// Returns some mutable reference to the boxed value if it is of type `T`, or
     /// `None` if it isn't.
-    fn as_mut<T: 'static>(self) -> Option<&'self mut T>;
+    fn as_mut<T: 'static>(self) -> Option<&'a mut T>;
 }
 
-impl<'self> AnyMutRefExt<'self> for &'self mut Any {
+impl<'a> AnyMutRefExt<'a> for &'a mut Any {
     #[inline]
-    fn as_mut<T: 'static>(self) -> Option<&'self mut T> {
+    fn as_mut<T: 'static>(self) -> Option<&'a mut T> {
         if self.is::<T>() {
             Some(unsafe { transmute(self.as_mut_void_ptr()) })
         } else {
@@ -149,7 +149,7 @@ impl ToStr for ~Any {
     fn to_str(&self) -> ~str { ~"~Any" }
 }
 
-impl<'self> ToStr for &'self Any {
+impl<'a> ToStr for &'a Any {
     fn to_str(&self) -> ~str { ~"&Any" }
 }