diff options
| author | GuillaumeGomez <guillaume1.gomez@gmail.com> | 2015-02-03 00:23:08 +0100 |
|---|---|---|
| committer | GuillaumeGomez <guillaume1.gomez@gmail.com> | 2015-02-06 11:59:10 +0100 |
| commit | d58c0a75978e068af8b01ab578b743c52635e1f4 (patch) | |
| tree | 2764c6584e8c3f9851fe65a686f07739db7e062d /src/libsyntax/diagnostics | |
| parent | 966e6c0c370317f06aa85248c17c7081d9736d99 (diff) | |
| download | rust-d58c0a75978e068af8b01ab578b743c52635e1f4.tar.gz rust-d58c0a75978e068af8b01ab578b743c52635e1f4.zip | |
Replace the get method by the deref one on InternedString
Diffstat (limited to 'src/libsyntax/diagnostics')
| -rw-r--r-- | src/libsyntax/diagnostics/plugin.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs index bd5247bbad6..6917daacaf2 100644 --- a/src/libsyntax/diagnostics/plugin.rs +++ b/src/libsyntax/diagnostics/plugin.rs @@ -10,6 +10,8 @@ use std::cell::RefCell; use std::collections::BTreeMap; +use std::ops::Deref; + use ast; use ast::{Ident, Name, TokenTree}; use codemap::Span; @@ -57,7 +59,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).get() + "diagnostic code {} already used", token::get_ident(code).deref() )[]); ecx.span_note(previous_span, "previous invocation"); }, @@ -68,7 +70,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).get() + "used diagnostic code {} not registered", token::get_ident(code).deref() )[]); } }); @@ -93,12 +95,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).get() + "diagnostic code {} already registered", token::get_ident(*code).deref() )[]); } }); let sym = Ident::new(token::gensym(&( - "__register_diagnostic_".to_string() + token::get_ident(*code).get() + "__register_diagnostic_".to_string() + token::get_ident(*code).deref() )[])); MacItems::new(vec![quote_item!(ecx, mod $sym {}).unwrap()].into_iter()) } |
