move error handling from libsyntax/diagnostics.rs to libsyntax/errors/*

Also split out emitters into their own module.
This commit is contained in:
Nick Cameron
2015-12-14 11:17:55 +13:00
parent 073b0f9b85
commit 6309b0f5bb
33 changed files with 207 additions and 1109 deletions

View File

@@ -203,7 +203,7 @@ use syntax::ext::base::{ExtCtxt, Annotatable};
use syntax::ext::build::AstBuilder;
use syntax::codemap::{self, DUMMY_SP};
use syntax::codemap::Span;
use syntax::diagnostic::SpanHandler;
use syntax::errors::Handler;
use syntax::util::move_map::MoveMap;
use syntax::owned_slice::OwnedSlice;
use syntax::parse::token::{intern, InternedString};
@@ -742,7 +742,7 @@ impl<'a> TraitDef<'a> {
}
}
fn find_repr_type_name(diagnostic: &SpanHandler,
fn find_repr_type_name(diagnostic: &Handler,
type_attrs: &[ast::Attribute]) -> &'static str {
let mut repr_type_name = "i32";
for a in type_attrs {