Skip to content

Commit 60133aa

Browse files
Remove macro, import function and enum
1 parent 31262c2 commit 60133aa

File tree

3 files changed

+155
-158
lines changed

3 files changed

+155
-158
lines changed

src/librustc_resolve/build_reduced_graph.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ use ParentLink::{self, ModuleParentLink, BlockParentLink};
2626
use Resolver;
2727
use resolve_imports::Shadowable;
2828
use TypeNsDef;
29+
use {resolve_error, ResolutionError};
2930

3031
use self::DuplicateCheckingMode::*;
3132
use self::NamespaceError::*;
@@ -208,12 +209,12 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
208209
// Return an error here by looking up the namespace that
209210
// had the duplicate.
210211
let ns = ns.unwrap();
211-
::resolve_error(
212+
resolve_error(
212213
self,
213214
sp,
214-
&::ResolutionError::DuplicateDefinition(
215+
ResolutionError::DuplicateDefinition(
215216
namespace_error_to_string(duplicate_type),
216-
&*token::get_name(name))
217+
name)
217218
);
218219
{
219220
let r = child.span_for_namespace(ns);
@@ -307,9 +308,9 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
307308
full_path.segments.last().unwrap().identifier.name;
308309
if &token::get_name(source_name)[..] == "mod" ||
309310
&token::get_name(source_name)[..] == "self" {
310-
::resolve_error(self,
311+
resolve_error(self,
311312
view_path.span,
312-
&::ResolutionError::SelfImportsOnlyAllowedWithin
313+
ResolutionError::SelfImportsOnlyAllowedWithin
313314
);
314315
}
315316

@@ -330,10 +331,10 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
330331
_ => None
331332
}).collect::<Vec<Span>>();
332333
if mod_spans.len() > 1 {
333-
::resolve_error(
334+
resolve_error(
334335
self,
335336
mod_spans[0],
336-
&::ResolutionError::SelfImportCanOnlyAppearOnceInTheList
337+
ResolutionError::SelfImportCanOnlyAppearOnceInTheList
337338
);
338339
for other_span in mod_spans.iter().skip(1) {
339340
self.session.span_note(*other_span,
@@ -349,10 +350,10 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
349350
let name = match module_path.last() {
350351
Some(name) => *name,
351352
None => {
352-
::resolve_error(
353+
resolve_error(
353354
self,
354355
source_item.span,
355-
&::ResolutionError::
356+
ResolutionError::
356357
SelfImportOnlyInImportListWithNonEmptyPrefix
357358
);
358359
continue;

0 commit comments

Comments
 (0)