diff options
| author | Brad Gibson <b2b@humanenginuity.com> | 2018-07-29 20:03:15 -0700 |
|---|---|---|
| committer | Brad Gibson <b2b@humanenginuity.com> | 2018-07-29 22:13:12 -0700 |
| commit | 56016cb1e02ece29f25c619b297f9c9797db821c (patch) | |
| tree | 70dd7a5658527a54769c7603e6e17bfe27985f86 /src/libsyntax/diagnostics/plugin.rs | |
| parent | 6a78c0a10f2e719117fe4bb929bfb38549acfeec (diff) | |
| parent | 866a713258915e6cbb212d135f751a6a8c9e1c0a (diff) | |
| download | rust-56016cb1e02ece29f25c619b297f9c9797db821c.tar.gz rust-56016cb1e02ece29f25c619b297f9c9797db821c.zip | |
resolved upstream merge conflicts
Diffstat (limited to 'src/libsyntax/diagnostics/plugin.rs')
| -rw-r--r-- | src/libsyntax/diagnostics/plugin.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs index aecf32ab6af..72ce2740190 100644 --- a/src/libsyntax/diagnostics/plugin.rs +++ b/src/libsyntax/diagnostics/plugin.rs @@ -42,7 +42,7 @@ pub type ErrorMap = BTreeMap<Name, ErrorInfo>; pub fn expand_diagnostic_used<'cx>(ecx: &'cx mut ExtCtxt, span: Span, token_tree: &[TokenTree]) - -> Box<MacResult+'cx> { + -> Box<dyn MacResult+'cx> { 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<MacResult+'cx> { + -> Box<dyn MacResult+'cx> { 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<MacResult+'cx> { + -> Box<dyn MacResult+'cx> { assert_eq!(token_tree.len(), 3); let (crate_name, name) = match (&token_tree[0], &token_tree[2]) { ( @@ -162,7 +162,7 @@ pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt, ecx.parse_sess.registered_diagnostics.with_lock(|diagnostics| { if let Err(e) = output_metadata(ecx, &target_triple, - &crate_name.name.as_str(), + &crate_name.as_str(), diagnostics) { ecx.span_bug(span, &format!( "error writing metadata for triple `{}` and crate `{}`, error: {}, \ @@ -207,7 +207,10 @@ pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt, span, ast::TyKind::Tup(vec![ty_str.clone(), ty_str]) ), - ecx.expr_usize(span, count), + ast::AnonConst { + id: ast::DUMMY_NODE_ID, + value: ecx.expr_usize(span, count), + }, ), ); |
