diff options
| author | GuillaumeGomez <guillaume1.gomez@gmail.com> | 2015-02-04 21:48:12 +0100 |
|---|---|---|
| committer | GuillaumeGomez <guillaume1.gomez@gmail.com> | 2015-02-06 12:03:46 +0100 |
| commit | 7b973ba827076fcee194521b21a3b30caab41012 (patch) | |
| tree | 3533b7aba112b9c40f3b1c3ff768af6ba799f65a /src/libsyntax/diagnostics/plugin.rs | |
| parent | 93fe5c82bfc58019cd799d9ceca8e22b380cfa60 (diff) | |
| download | rust-7b973ba827076fcee194521b21a3b30caab41012.tar.gz rust-7b973ba827076fcee194521b21a3b30caab41012.zip | |
Update to last version, remove "[]" as much as possible
Diffstat (limited to 'src/libsyntax/diagnostics/plugin.rs')
| -rw-r--r-- | src/libsyntax/diagnostics/plugin.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs index 4a3c1f48252..833a6d52acb 100644 --- a/src/libsyntax/diagnostics/plugin.rs +++ b/src/libsyntax/diagnostics/plugin.rs @@ -58,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)[] + "diagnostic code {} already used", &token::get_ident(code) )[]); ecx.span_note(previous_span, "previous invocation"); }, @@ -69,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)[] + "used diagnostic code {} not registered", &token::get_ident(code) )[]); } }); @@ -94,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)[] + "diagnostic code {} already registered", &token::get_ident(*code) )[]); } }); let sym = Ident::new(token::gensym(&( - "__register_diagnostic_".to_string() + &token::get_ident(*code)[] + "__register_diagnostic_".to_string() + &token::get_ident(*code) )[])); MacItems::new(vec![quote_item!(ecx, mod $sym {}).unwrap()].into_iter()) } |
