]> git.lizzy.rs Git - rust.git/commitdiff
Remove unused method
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Sun, 12 Jul 2015 22:40:54 +0000 (00:40 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Sun, 12 Jul 2015 22:45:50 +0000 (00:45 +0200)
src/librustc_resolve/lib.rs

index c0e42f269ee2f5b891add36e8bc8e54805974d07..b0cff1406c5cce5276da494ea7bc5f315a95f010 100644 (file)
 #![feature(slice_extras)]
 #![feature(staged_api)]
 
-#![macro_use]
-
-macro_rules! resolve_err {
-    ($this:expr, $span:expr, $code:ident, $($rest:tt)*) => {
-        if $this.emit_errors {
-            span_err!($this.session, $span, $code, $($rest)*);
-        }
-    }
-}
-
 #[macro_use] extern crate log;
 #[macro_use] extern crate syntax;
 #[macro_use] #[no_link] extern crate rustc_bitflags;
@@ -109,11 +99,18 @@ macro_rules! resolve_err {
 use resolve_imports::{Target, ImportDirective, ImportResolution};
 use resolve_imports::Shadowable;
 
-
 // NB: This module needs to be declared first so diagnostics are
 // registered before they are used.
 pub mod diagnostics;
 
+macro_rules! resolve_err {
+    ($this:expr, $span:expr, $code:ident, $($rest:tt)*) => {
+        if $this.emit_errors {
+            span_err!($this.session, $span, $code, $($rest)*);
+        }
+    }
+}
+
 mod check_unused;
 mod record_exports;
 mod build_reduced_graph;
@@ -2253,10 +2250,10 @@ fn check_consistent_bindings(&mut self, arm: &Arm) {
             for (&key, &binding) in &map_i {
                 if !map_0.contains_key(&key) {
                     resolve_err!(self, binding.span, E0410,
-                                 "variable `{}` from pattern {}{} is \
-                                  not bound in pattern {}1",
+                                 "variable `{}` from pattern #{} is \
+                                  not bound in pattern #1",
                                  key,
-                                 "#", i + 1, "#");
+                                 i + 1);
                 }
             }
         }
@@ -2371,7 +2368,6 @@ fn resolve_type(&mut self, ty: &Ty) {
                             path.segments[0].identifier.name == self_type_name;
                         if is_invalid_self_type_name {
                             resolve_err!(self, ty.span, E0411,
-                                         "{}",
                                          "use of `Self` outside of an impl or trait");
                         } else {
                             resolve_err!(self, ty.span, E0412,
@@ -3093,12 +3089,6 @@ fn with_no_errors<T, F>(&mut self, f: F) -> T where
         rs
     }
 
-    fn resolve_error(&self, span: Span, s: &str) {
-        if self.emit_errors {
-            self.session.span_err(span, s);
-        }
-    }
-
     fn find_fallback_in_self_type(&mut self, name: Name) -> FallbackSuggestion {
         fn extract_path_and_node_id(t: &Ty, allow: FallbackChecks)
                                                     -> Option<(Path, NodeId, FallbackChecks)> {