about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBen Striegel <ben.striegel@gmail.com>2013-03-08 19:34:39 -0500
committerBen Striegel <ben.striegel@gmail.com>2013-03-08 19:34:39 -0500
commitfdf69dd7b0f0be63ea811e0e01f799f2e077d52d (patch)
treeeac8c9f3a8a1d6ed4bbe3b85faf1e0ad733b3dc2
parentddecef794450fe37f84c8b2316b30eff83b0920b (diff)
downloadrust-fdf69dd7b0f0be63ea811e0e01f799f2e077d52d.tar.gz
rust-fdf69dd7b0f0be63ea811e0e01f799f2e077d52d.zip
Finish de-implicit-selfing everything but the test suite
-rw-r--r--src/libcore/core.rc1
-rw-r--r--src/libfuzzer/fuzzer.rc1
-rw-r--r--src/librust/rust.rc2
-rw-r--r--src/librustc/middle/astencode.rs6
-rw-r--r--src/librustc/middle/liveness.rs2
-rw-r--r--src/librustc/middle/resolve.rs12
-rw-r--r--src/librustc/middle/typeck/check/method.rs5
-rw-r--r--src/librustc/middle/typeck/coherence.rs10
-rw-r--r--src/librustc/middle/typeck/infer/mod.rs6
-rw-r--r--src/librustc/rustc.rc2
-rw-r--r--src/librustdoc/rustdoc.rc1
-rw-r--r--src/librusti/rusti.rc1
-rw-r--r--src/librustpkg/rustpkg.rc1
13 files changed, 28 insertions, 22 deletions
diff --git a/src/libcore/core.rc b/src/libcore/core.rc
index 42312d96d1b..4d686c8ab33 100644
--- a/src/libcore/core.rc
+++ b/src/libcore/core.rc
@@ -51,6 +51,7 @@ Implicitly, all crates behave as if they included the following prologue:
 #[warn(vecs_implicitly_copyable)];
 #[deny(non_camel_case_types)];
 #[allow(deprecated_mutable_fields)];
+#[deny(deprecated_self)];
 
 // On Linux, link to the runtime with -lrt.
 #[cfg(target_os = "linux")]
diff --git a/src/libfuzzer/fuzzer.rc b/src/libfuzzer/fuzzer.rc
index 19afbc4b2b7..f21029a8a4f 100644
--- a/src/libfuzzer/fuzzer.rc
+++ b/src/libfuzzer/fuzzer.rc
@@ -25,6 +25,7 @@
 #[allow(non_camel_case_types)];
 #[allow(deprecated_mode)];
 #[allow(deprecated_pattern)];
+#[deny(deprecated_self)];
 
 extern mod core(vers = "0.6");
 extern mod std(vers = "0.6");
diff --git a/src/librust/rust.rc b/src/librust/rust.rc
index 023383b3dcc..082861e0ae0 100644
--- a/src/librust/rust.rc
+++ b/src/librust/rust.rc
@@ -12,6 +12,8 @@
 // XXX: Make commands run and test emit proper file endings on winds
 // XXX: Make run only accept source that emits an executable
 
+#[deny(deprecated_self)];
+
 #[link(name = "rust",
        vers = "0.6",
        uuid = "4a24da33-5cc8-4037-9352-2cbe9bd9d27c",
diff --git a/src/librustc/middle/astencode.rs b/src/librustc/middle/astencode.rs
index 6f0bfbb197f..48fddec0079 100644
--- a/src/librustc/middle/astencode.rs
+++ b/src/librustc/middle/astencode.rs
@@ -721,12 +721,12 @@ impl vtable_decoder_helpers for reader::Decoder {
 // Encoding and decoding the side tables
 
 trait get_ty_str_ctxt {
-    fn ty_str_ctxt() -> @tyencode::ctxt;
+    fn ty_str_ctxt(@self) -> @tyencode::ctxt;
 }
 
-impl get_ty_str_ctxt for @e::EncodeContext {
+impl get_ty_str_ctxt for e::EncodeContext {
     // IMPLICIT SELF WARNING: fix this!
-    fn ty_str_ctxt() -> @tyencode::ctxt {
+    fn ty_str_ctxt(@self) -> @tyencode::ctxt {
         @tyencode::ctxt {diag: self.tcx.sess.diagnostic(),
                         ds: e::def_to_str,
                         tcx: self.tcx,
diff --git a/src/librustc/middle/liveness.rs b/src/librustc/middle/liveness.rs
index f0c06ceca98..068327dc741 100644
--- a/src/librustc/middle/liveness.rs
+++ b/src/librustc/middle/liveness.rs
@@ -816,7 +816,7 @@ pub impl Liveness {
         }
     }
 
-    fn indices2(ln: LiveNode, succ_ln: LiveNode,
+    fn indices2(&self, ln: LiveNode, succ_ln: LiveNode,
                 op: fn(uint, uint)) {
         let node_base_idx = self.idx(ln, Variable(0u));
         let succ_base_idx = self.idx(succ_ln, Variable(0u));
diff --git a/src/librustc/middle/resolve.rs b/src/librustc/middle/resolve.rs
index 391990eed95..d1e35f7a19d 100644
--- a/src/librustc/middle/resolve.rs
+++ b/src/librustc/middle/resolve.rs
@@ -592,7 +592,7 @@ pub impl NameBindings {
     }
 
     /// Returns the module node if applicable.
-    fn get_module_if_available() -> Option<@mut Module> {
+    fn get_module_if_available(&self) -> Option<@mut Module> {
         match self.type_def {
             Some(ref type_def) => (*type_def).module_def,
             None => None
@@ -613,14 +613,14 @@ pub impl NameBindings {
         }
     }
 
-    fn defined_in_namespace(namespace: Namespace) -> bool {
+    fn defined_in_namespace(&self, namespace: Namespace) -> bool {
         match namespace {
             TypeNS   => return self.type_def.is_some(),
             ValueNS  => return self.value_def.is_some()
         }
     }
 
-    fn defined_in_public_namespace(namespace: Namespace) -> bool {
+    fn defined_in_public_namespace(&self, namespace: Namespace) -> bool {
         match namespace {
             TypeNS => match self.type_def {
                 Some(def) => def.privacy != Private,
@@ -633,7 +633,7 @@ pub impl NameBindings {
         }
     }
 
-    fn def_for_namespace(namespace: Namespace) -> Option<def> {
+    fn def_for_namespace(&self, namespace: Namespace) -> Option<def> {
         match namespace {
             TypeNS => {
                 match self.type_def {
@@ -666,7 +666,7 @@ pub impl NameBindings {
         }
     }
 
-    fn privacy_for_namespace(namespace: Namespace) -> Option<Privacy> {
+    fn privacy_for_namespace(&self, namespace: Namespace) -> Option<Privacy> {
         match namespace {
             TypeNS => {
                 match self.type_def {
@@ -683,7 +683,7 @@ pub impl NameBindings {
         }
     }
 
-    fn span_for_namespace(namespace: Namespace) -> Option<span> {
+    fn span_for_namespace(&self, namespace: Namespace) -> Option<span> {
         if self.defined_in_namespace(namespace) {
             match namespace {
                 TypeNS  => self.type_span,
diff --git a/src/librustc/middle/typeck/check/method.rs b/src/librustc/middle/typeck/check/method.rs
index 0bcbb3012cf..3395d9b4451 100644
--- a/src/librustc/middle/typeck/check/method.rs
+++ b/src/librustc/middle/typeck/check/method.rs
@@ -235,7 +235,8 @@ pub impl LookupContext/&self {
         self.search_for_autosliced_method(self_ty, autoderefs)
     }
 
-    fn deref(ty: ty::t, enum_dids: &mut ~[ast::def_id]) -> Option<ty::t> {
+    fn deref(&self, ty: ty::t, enum_dids: &mut ~[ast::def_id])
+            -> Option<ty::t> {
         match ty::get(ty).sty {
             ty_enum(did, _) => {
                 // Watch out for newtype'd enums like "enum t = @T".
@@ -599,7 +600,7 @@ pub impl LookupContext/&self {
         }
     }
 
-    fn push_inherent_impl_candidates_for_type(did: def_id) {
+    fn push_inherent_impl_candidates_for_type(&self, did: def_id) {
         let opt_impl_infos =
             self.fcx.ccx.coherence_info.inherent_methods.find(&did);
         for opt_impl_infos.each |impl_infos| {
diff --git a/src/librustc/middle/typeck/coherence.rs b/src/librustc/middle/typeck/coherence.rs
index 3e453238072..00352ba2958 100644
--- a/src/librustc/middle/typeck/coherence.rs
+++ b/src/librustc/middle/typeck/coherence.rs
@@ -191,15 +191,14 @@ pub struct CoherenceChecker {
 }
 
 pub impl CoherenceChecker {
-    // IMPLICIT SELF WARNING: fix this!
-    fn check_coherence(crate: @crate) {
+    fn check_coherence(self, crate: @crate) {
         // Check implementations and traits. This populates the tables
         // containing the inherent methods and extension methods. It also
         // builds up the trait inheritance table.
         visit_crate(*crate, (), mk_simple_visitor(@SimpleVisitor {
             visit_item: |item| {
-                debug!("(checking coherence) item '%s'",
-                       *self.crate_context.tcx.sess.str_of(item.ident));
+//                debug!("(checking coherence) item '%s'",
+//                       self.crate_context.tcx.sess.str_of(item.ident));
 
                 match item.node {
                     item_impl(_, opt_trait, _, _) => {
@@ -617,8 +616,7 @@ pub impl CoherenceChecker {
     }
 
     // Privileged scope checking
-    // IMPLICIT SELF WARNING: fix this!
-    fn check_privileged_scopes(crate: @crate) {
+    fn check_privileged_scopes(self, crate: @crate) {
         visit_crate(*crate, (), mk_vt(@Visitor {
             visit_item: |item, _context, visitor| {
                 match /*bad*/copy item.node {
diff --git a/src/librustc/middle/typeck/infer/mod.rs b/src/librustc/middle/typeck/infer/mod.rs
index 9cb6c473d58..a334ba57e6e 100644
--- a/src/librustc/middle/typeck/infer/mod.rs
+++ b/src/librustc/middle/typeck/infer/mod.rs
@@ -584,7 +584,7 @@ pub impl @mut InferCtxt {
     }
 
     /// Execute `f` and commit the bindings if successful
-    fn commit<T,E>(f: fn() -> Result<T,E>) -> Result<T,E> {
+    fn commit<T,E>(&self, f: fn() -> Result<T,E>) -> Result<T,E> {
         fail_unless!(!self.in_snapshot());
 
         debug!("commit()");
@@ -599,7 +599,7 @@ pub impl @mut InferCtxt {
     }
 
     /// Execute `f`, unroll bindings on failure
-    fn try<T,E>(f: fn() -> Result<T,E>) -> Result<T,E> {
+    fn try<T,E>(&self, f: fn() -> Result<T,E>) -> Result<T,E> {
         debug!("try()");
         do indent {
             let snapshot = self.start_snapshot();
@@ -613,7 +613,7 @@ pub impl @mut InferCtxt {
     }
 
     /// Execute `f` then unroll any bindings it creates
-    fn probe<T,E>(f: fn() -> Result<T,E>) -> Result<T,E> {
+    fn probe<T,E>(&self, f: fn() -> Result<T,E>) -> Result<T,E> {
         debug!("probe()");
         do indent {
             let snapshot = self.start_snapshot();
diff --git a/src/librustc/rustc.rc b/src/librustc/rustc.rc
index 355ecaed7d7..296c94f3299 100644
--- a/src/librustc/rustc.rc
+++ b/src/librustc/rustc.rc
@@ -24,7 +24,7 @@
 #[allow(non_camel_case_types)];
 #[allow(deprecated_mode)];
 #[warn(deprecated_pattern)];
-#[allow(deprecated_self)];
+#[deny(deprecated_self)];
 
 #[no_core];
 
diff --git a/src/librustdoc/rustdoc.rc b/src/librustdoc/rustdoc.rc
index 9bd78e54b78..f17f7ffd9cf 100644
--- a/src/librustdoc/rustdoc.rc
+++ b/src/librustdoc/rustdoc.rc
@@ -22,6 +22,7 @@
 #[no_core];
 
 #[allow(non_implicitly_copyable_typarams)];
+#[deny(deprecated_self)];
 
 extern mod core(vers = "0.6");
 extern mod std(vers = "0.6");
diff --git a/src/librusti/rusti.rc b/src/librusti/rusti.rc
index 3e1b0c03bd7..6674885a6e2 100644
--- a/src/librusti/rusti.rc
+++ b/src/librusti/rusti.rc
@@ -22,6 +22,7 @@
 
 #[allow(vecs_implicitly_copyable,
         non_implicitly_copyable_typarams)];
+#[deny(deprecated_self)];
 
 extern mod core(vers = "0.6");
 extern mod std(vers = "0.6");
diff --git a/src/librustpkg/rustpkg.rc b/src/librustpkg/rustpkg.rc
index 0f8463b0b3c..5b9f3c3cd22 100644
--- a/src/librustpkg/rustpkg.rc
+++ b/src/librustpkg/rustpkg.rc
@@ -20,6 +20,7 @@
 #[no_core];
 #[allow(vecs_implicitly_copyable,
         non_implicitly_copyable_typarams)];
+#[deny(deprecated_self)];
 
 extern mod core(vers = "0.6");
 extern mod std(vers = "0.6");