diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2023-03-10 14:18:58 +0000 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2023-05-02 10:32:08 +0000 |
| commit | abb181dfd9b9df22908ab08d7cfb46509295e2e6 (patch) | |
| tree | 3872f7b6250f2b217082481899f4de183d12a3c7 /compiler/rustc_ast | |
| parent | bf3ca5979e47774802e95623c11e71fb303e5ff3 (diff) | |
| download | rust-abb181dfd9b9df22908ab08d7cfb46509295e2e6.tar.gz rust-abb181dfd9b9df22908ab08d7cfb46509295e2e6.zip | |
make it semantic error
Diffstat (limited to 'compiler/rustc_ast')
| -rw-r--r-- | compiler/rustc_ast/src/util/literal.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_ast/src/util/literal.rs b/compiler/rustc_ast/src/util/literal.rs index cd3b163e3ac..15a54fe13d0 100644 --- a/compiler/rustc_ast/src/util/literal.rs +++ b/compiler/rustc_ast/src/util/literal.rs @@ -8,6 +8,7 @@ use rustc_lexer::unescape::{ }; use rustc_span::symbol::{kw, sym, Symbol}; use rustc_span::Span; +use std::ops::Range; use std::{ascii, fmt, str}; // Escapes a string, represented as a symbol. Reuses the original symbol, @@ -38,6 +39,7 @@ pub enum LitError { InvalidFloatSuffix, NonDecimalFloat(u32), IntTooLarge(u32), + NulInCStr(Range<usize>), } impl LitKind { |
