diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-14 20:12:05 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-15 14:46:08 +1100 |
| commit | 25ed6e43b0ea03ca48692741624f3e70d717ea43 (patch) | |
| tree | 7c4dc20f60c6c62d239cd710400998f405ab1bd8 /compiler/rustc_builtin_macros/src/concat_bytes.rs | |
| parent | 332c57723a03e97497d6fba6636e31c2e41fefe9 (diff) | |
| download | rust-25ed6e43b0ea03ca48692741624f3e70d717ea43.tar.gz rust-25ed6e43b0ea03ca48692741624f3e70d717ea43.zip | |
Add `ErrorGuaranteed` to `ast::LitKind::Err`, `token::LitKind::Err`.
This mostly works well, and eliminates a couple of delayed bugs. One annoying thing is that we should really also add an `ErrorGuaranteed` to `proc_macro::bridge::LitKind::Err`. But that's difficult because `proc_macro` doesn't have access to `ErrorGuaranteed`, so we have to fake it.
Diffstat (limited to 'compiler/rustc_builtin_macros/src/concat_bytes.rs')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/concat_bytes.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_builtin_macros/src/concat_bytes.rs b/compiler/rustc_builtin_macros/src/concat_bytes.rs index a01bbeac824..3ef8cb7bffe 100644 --- a/compiler/rustc_builtin_macros/src/concat_bytes.rs +++ b/compiler/rustc_builtin_macros/src/concat_bytes.rs @@ -44,7 +44,7 @@ fn invalid_type_err( Ok(ast::LitKind::Bool(_)) => { dcx.emit_err(ConcatBytesInvalid { span, lit_kind: "boolean", sugg: None }); } - Ok(ast::LitKind::Err) => {} + Ok(ast::LitKind::Err(_)) => {} Ok(ast::LitKind::Int(_, _)) if !is_nested => { let sugg = snippet.map(|snippet| ConcatBytesInvalidSuggestion::IntLit { span: span, snippet }); |
