From e28e4877a828d1f5bda49dbb5bae1b902596f8f6 Mon Sep 17 00:00:00 2001 From: ljedrz Date: Tue, 10 Jul 2018 21:06:26 +0200 Subject: Deny bare trait objects in in src/libsyntax --- src/libsyntax/diagnostics/plugin.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libsyntax/diagnostics/plugin.rs') diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs index ca0293aca6e..72ce2740190 100644 --- a/src/libsyntax/diagnostics/plugin.rs +++ b/src/libsyntax/diagnostics/plugin.rs @@ -42,7 +42,7 @@ pub type ErrorMap = BTreeMap; pub fn expand_diagnostic_used<'cx>(ecx: &'cx mut ExtCtxt, span: Span, token_tree: &[TokenTree]) - -> Box { + -> Box { let code = match (token_tree.len(), token_tree.get(0)) { (1, Some(&TokenTree::Token(_, token::Ident(code, _)))) => code, _ => unreachable!() @@ -75,7 +75,7 @@ pub fn expand_diagnostic_used<'cx>(ecx: &'cx mut ExtCtxt, pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt, span: Span, token_tree: &[TokenTree]) - -> Box { + -> Box { let (code, description) = match ( token_tree.len(), token_tree.get(0), @@ -145,7 +145,7 @@ pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt, pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt, span: Span, token_tree: &[TokenTree]) - -> Box { + -> Box { assert_eq!(token_tree.len(), 3); let (crate_name, name) = match (&token_tree[0], &token_tree[2]) { ( -- cgit 1.4.1-3-g733a5