diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-08-23 20:40:09 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-23 20:40:09 +0530 |
| commit | 28ead17745916a602fed4ed41a104fb7856544f5 (patch) | |
| tree | 0ed13d7fbdb1bbecb2499452d47625c915ec93b2 /compiler/rustc_builtin_macros/src | |
| parent | 12c1ac0a67d17e21a8d2e21941d3f3bd6b45c272 (diff) | |
| parent | 6087dc20542e9d88445604e3d8b1dd93c8fad04b (diff) | |
| download | rust-28ead17745916a602fed4ed41a104fb7856544f5.tar.gz rust-28ead17745916a602fed4ed41a104fb7856544f5.zip | |
Rollup merge of #100909 - nnethercote:minor-ast-LitKind-improvement, r=petrochenkov
Minor `ast::LitKind` improvements r? `@petrochenkov`
Diffstat (limited to 'compiler/rustc_builtin_macros/src')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/concat.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_builtin_macros/src/concat_bytes.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_builtin_macros/src/concat.rs b/compiler/rustc_builtin_macros/src/concat.rs index a23dd1d1213..41f4e8c234d 100644 --- a/compiler/rustc_builtin_macros/src/concat.rs +++ b/compiler/rustc_builtin_macros/src/concat.rs @@ -39,7 +39,7 @@ pub fn expand_concat( ast::LitKind::Byte(..) | ast::LitKind::ByteStr(..) => { cx.span_err(e.span, "cannot concatenate a byte string literal"); } - ast::LitKind::Err(_) => { + ast::LitKind::Err => { has_errors = true; } }, diff --git a/compiler/rustc_builtin_macros/src/concat_bytes.rs b/compiler/rustc_builtin_macros/src/concat_bytes.rs index c0f35d122f8..66e86bf2182 100644 --- a/compiler/rustc_builtin_macros/src/concat_bytes.rs +++ b/compiler/rustc_builtin_macros/src/concat_bytes.rs @@ -42,7 +42,7 @@ fn invalid_type_err(cx: &mut base::ExtCtxt<'_>, expr: &P<rustc_ast::Expr>, is_ne ast::LitKind::Bool(_) => { cx.span_err(expr.span, "cannot concatenate boolean literals"); } - ast::LitKind::Err(_) => {} + ast::LitKind::Err => {} ast::LitKind::Int(_, _) if !is_nested => { let mut err = cx.struct_span_err(expr.span, "cannot concatenate numeric literals"); if let Ok(snippet) = cx.sess.source_map().span_to_snippet(expr.span) { |
