diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2015-12-14 11:17:55 +1300 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2015-12-17 09:35:50 +1300 |
| commit | 6309b0f5bb558b844f45b2d313d2078fd7b7614c (patch) | |
| tree | 3666b39af4692755af1cdac1bde215bbb2842f02 /src/librustc_plugin | |
| parent | 073b0f9b852fa8b14ea4ab8c5a724043eb39fce5 (diff) | |
| download | rust-6309b0f5bb558b844f45b2d313d2078fd7b7614c.tar.gz rust-6309b0f5bb558b844f45b2d313d2078fd7b7614c.zip | |
move error handling from libsyntax/diagnostics.rs to libsyntax/errors/*
Also split out emitters into their own module.
Diffstat (limited to 'src/librustc_plugin')
| -rw-r--r-- | src/librustc_plugin/build.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_plugin/build.rs b/src/librustc_plugin/build.rs index 00f58c6af91..476425a75c2 100644 --- a/src/librustc_plugin/build.rs +++ b/src/librustc_plugin/build.rs @@ -13,7 +13,7 @@ use syntax::ast; use syntax::attr; use syntax::codemap::Span; -use syntax::diagnostic; +use syntax::errors; use rustc_front::intravisit::Visitor; use rustc_front::hir; @@ -33,7 +33,7 @@ impl<'v> Visitor<'v> for RegistrarFinder { } /// Find the function marked with `#[plugin_registrar]`, if any. -pub fn find_plugin_registrar(diagnostic: &diagnostic::SpanHandler, +pub fn find_plugin_registrar(diagnostic: &errors::Handler, krate: &hir::Crate) -> Option<ast::NodeId> { let mut finder = RegistrarFinder { registrars: Vec::new() }; @@ -46,11 +46,11 @@ pub fn find_plugin_registrar(diagnostic: &diagnostic::SpanHandler, Some(node_id) }, _ => { - diagnostic.handler().err("multiple plugin registration functions found"); + diagnostic.err("multiple plugin registration functions found"); for &(_, span) in &finder.registrars { diagnostic.span_note(span, "one is here"); } - diagnostic.handler().abort_if_errors(); + diagnostic.abort_if_errors(); unreachable!(); } } |
