Skip to content

Commit f1b231d

Browse files
Remove unused method
1 parent 8b731a5 commit f1b231d

File tree

1 file changed

+11
-21
lines changed

1 file changed

+11
-21
lines changed

src/librustc_resolve/lib.rs

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,6 @@
2626
#![feature(slice_extras)]
2727
#![feature(staged_api)]
2828

29-
#![macro_use]
30-
31-
macro_rules! resolve_err {
32-
($this:expr, $span:expr, $code:ident, $($rest:tt)*) => {
33-
if $this.emit_errors {
34-
span_err!($this.session, $span, $code, $($rest)*);
35-
}
36-
}
37-
}
38-
3929
#[macro_use] extern crate log;
4030
#[macro_use] extern crate syntax;
4131
#[macro_use] #[no_link] extern crate rustc_bitflags;
@@ -109,11 +99,18 @@ use std::usize;
10999
use resolve_imports::{Target, ImportDirective, ImportResolution};
110100
use resolve_imports::Shadowable;
111101

112-
113102
// NB: This module needs to be declared first so diagnostics are
114103
// registered before they are used.
115104
pub mod diagnostics;
116105

106+
macro_rules! resolve_err {
107+
($this:expr, $span:expr, $code:ident, $($rest:tt)*) => {
108+
if $this.emit_errors {
109+
span_err!($this.session, $span, $code, $($rest)*);
110+
}
111+
}
112+
}
113+
117114
mod check_unused;
118115
mod record_exports;
119116
mod build_reduced_graph;
@@ -2253,10 +2250,10 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
22532250
for (&key, &binding) in &map_i {
22542251
if !map_0.contains_key(&key) {
22552252
resolve_err!(self, binding.span, E0410,
2256-
"variable `{}` from pattern {}{} is \
2257-
not bound in pattern {}1",
2253+
"variable `{}` from pattern #{} is \
2254+
not bound in pattern #1",
22582255
key,
2259-
"#", i + 1, "#");
2256+
i + 1);
22602257
}
22612258
}
22622259
}
@@ -2371,7 +2368,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
23712368
path.segments[0].identifier.name == self_type_name;
23722369
if is_invalid_self_type_name {
23732370
resolve_err!(self, ty.span, E0411,
2374-
"{}",
23752371
"use of `Self` outside of an impl or trait");
23762372
} else {
23772373
resolve_err!(self, ty.span, E0412,
@@ -3093,12 +3089,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
30933089
rs
30943090
}
30953091

3096-
fn resolve_error(&self, span: Span, s: &str) {
3097-
if self.emit_errors {
3098-
self.session.span_err(span, s);
3099-
}
3100-
}
3101-
31023092
fn find_fallback_in_self_type(&mut self, name: Name) -> FallbackSuggestion {
31033093
fn extract_path_and_node_id(t: &Ty, allow: FallbackChecks)
31043094
-> Option<(Path, NodeId, FallbackChecks)> {

0 commit comments

Comments
 (0)