about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorFelix S Klock II <pnkfelix@pnkfx.org>2015-05-23 07:50:46 +0200
committerFelix S Klock II <pnkfelix@pnkfx.org>2015-05-23 07:50:46 +0200
commit38a97becdf3e6a6157f6f7ec2d98ade8d8edc193 (patch)
treea025332b1147c9199e4230df74c5c71897788e94 /src/libsyntax
parentc3d60aba6c86883c79055c1a3923d4db116b644e (diff)
parentdeaa1172cf2871e04ca2524b6b553afb143f677a (diff)
downloadrust-38a97becdf3e6a6157f6f7ec2d98ade8d8edc193.tar.gz
rust-38a97becdf3e6a6157f6f7ec2d98ade8d8edc193.zip
Merge pull request #25706 from pnkfelix/remove-diagnostics-gen-and-check
Remove error diagnostics uniqueness check and .json generation.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/diagnostics/plugin.rs21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs
index 16841bd9039..620ac1280f4 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<MacResult+'cx> {
     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,21 +157,9 @@ 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");
-    });
+    // FIXME (#25705): we used to ensure error code uniqueness and
+    // output error description JSON metadata here, but the approach
+    // employed was too brittle.
 
     // Construct the output expression.
     let (count, expr) =