diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs index 16841bd903981..e0ce17e632449 100644 --- a/src/libsyntax/diagnostics/plugin.rs +++ b/src/libsyntax/diagnostics/plugin.rs @@ -14,7 +14,6 @@ use std::collections::BTreeMap; use ast; use ast::{Ident, Name, TokenTree}; use codemap::Span; -use diagnostics::metadata::{check_uniqueness, output_metadata, Duplicate}; use ext::base::{ExtCtxt, MacEager, MacResult}; use ext::build::AstBuilder; use parse::token; @@ -148,7 +147,7 @@ pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt, token_tree: &[TokenTree]) -> Box { assert_eq!(token_tree.len(), 3); - let (crate_name, name) = match (&token_tree[0], &token_tree[2]) { + let (_crate_name, name) = match (&token_tree[0], &token_tree[2]) { ( // Crate name. &ast::TtToken(_, token::Ident(ref crate_name, _)), @@ -158,22 +157,6 @@ pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt, _ => unreachable!() }; - // Check uniqueness of errors and output metadata. - with_registered_diagnostics(|diagnostics| { - match check_uniqueness(crate_name, &*diagnostics) { - Ok(Duplicate(err, location)) => { - ecx.span_err(span, &format!( - "error {} from `{}' also found in `{}'", - err, crate_name, location - )); - }, - Ok(_) => (), - Err(e) => panic!("{}", e.description()) - } - - output_metadata(&*ecx, crate_name, &*diagnostics).ok().expect("metadata output error"); - }); - // Construct the output expression. let (count, expr) = with_registered_diagnostics(|diagnostics| {