about summary refs log tree commit diff
path: root/src/libsyntax/diagnostics/plugin.rs
diff options
context:
space:
mode:
authorGuillaumeGomez <guillaume1.gomez@gmail.com>2015-02-03 23:31:06 +0100
committerGuillaumeGomez <guillaume1.gomez@gmail.com>2015-02-06 11:59:10 +0100
commit8b12d3ddf981e5450d8159b29db6ee2197064c8a (patch)
treeb15555d7f66257a4a2dbd58aa6e14db9a3521f61 /src/libsyntax/diagnostics/plugin.rs
parent12f1f4c5467b0f4cbdb66c67eca7e5227dbb1284 (diff)
downloadrust-8b12d3ddf981e5450d8159b29db6ee2197064c8a.tar.gz
rust-8b12d3ddf981e5450d8159b29db6ee2197064c8a.zip
Libsyntax has been updated
Diffstat (limited to 'src/libsyntax/diagnostics/plugin.rs')
-rw-r--r--src/libsyntax/diagnostics/plugin.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs
index 6917daacaf2..4a3c1f48252 100644
--- a/src/libsyntax/diagnostics/plugin.rs
+++ b/src/libsyntax/diagnostics/plugin.rs
@@ -10,7 +10,6 @@
 
 use std::cell::RefCell;
 use std::collections::BTreeMap;
-use std::ops::Deref;
 
 use ast;
 use ast::{Ident, Name, TokenTree};
@@ -59,7 +58,7 @@ pub fn expand_diagnostic_used<'cx>(ecx: &'cx mut ExtCtxt,
         match diagnostics.insert(code.name, span) {
             Some(previous_span) => {
                 ecx.span_warn(span, &format!(
-                    "diagnostic code {} already used", token::get_ident(code).deref()
+                    "diagnostic code {} already used", &token::get_ident(code)[]
                 )[]);
                 ecx.span_note(previous_span, "previous invocation");
             },
@@ -70,7 +69,7 @@ pub fn expand_diagnostic_used<'cx>(ecx: &'cx mut ExtCtxt,
     with_registered_diagnostics(|diagnostics| {
         if !diagnostics.contains_key(&code.name) {
             ecx.span_err(span, &format!(
-                "used diagnostic code {} not registered", token::get_ident(code).deref()
+                "used diagnostic code {} not registered", &token::get_ident(code)[]
             )[]);
         }
     });
@@ -95,12 +94,12 @@ pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt,
     with_registered_diagnostics(|diagnostics| {
         if diagnostics.insert(code.name, description).is_some() {
             ecx.span_err(span, &format!(
-                "diagnostic code {} already registered", token::get_ident(*code).deref()
+                "diagnostic code {} already registered", &token::get_ident(*code)[]
             )[]);
         }
     });
     let sym = Ident::new(token::gensym(&(
-        "__register_diagnostic_".to_string() + token::get_ident(*code).deref()
+        "__register_diagnostic_".to_string() + &token::get_ident(*code)[]
     )[]));
     MacItems::new(vec![quote_item!(ecx, mod $sym {}).unwrap()].into_iter())
 }