This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 2d1434d
committed
Auto merge of rust-lang#138163 - hkBst:cleanup_lexer_unescape_macros, r=<try>
Separate the unescape functions but avoid duplicating code
Separate the unescape functions for string, byte string and C string, but avoid duplicating code via macro_rules.
Also plays with NonZero, since C strings cannot contain null bytes, which can be captured in the type system.
r? `@nnethercote`File tree
9 files changed
+360
-379
lines changed- compiler
- rustc_ast/src/util
- rustc_lexer/src
- unescape
- rustc_parse/src/lexer
- library/core/src/num
- src/tools/rust-analyzer/crates
- parser/src
- syntax/src
- ast
9 files changed
+360
-379
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | | - | |
93 | 92 | | |
94 | | - | |
| 93 | + | |
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
| |||
111 | 110 | | |
112 | 111 | | |
113 | 112 | | |
114 | | - | |
115 | | - | |
| 113 | + | |
| 114 | + | |
116 | 115 | | |
117 | 116 | | |
118 | 117 | | |
| |||
128 | 127 | | |
129 | 128 | | |
130 | 129 | | |
131 | | - | |
| 130 | + | |
132 | 131 | | |
133 | | - | |
| 132 | + | |
134 | 133 | | |
135 | | - | |
| 134 | + | |
136 | 135 | | |
137 | 136 | | |
138 | 137 | | |
| |||
0 commit comments