This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 76e2e41
committed
Auto merge of rust-lang#13652 - jhgg:hir-expand/fix-compile-error-expansion, r=Veykril
hir-expand: fix compile_error! expansion not unquoting strings
expanding `compile_error!` would not properly unquote strings, leading to quite ugly diagnostic messages:

this fixes it, using the conveniently placed `unquote_str` function, which now makes errors look like:

additionally, using `unquote_str` has the cool side-effect of *also* handling raw strings, so this fixes a fixme too!File tree
2 files changed
+8
-11
lines changed- crates
- hir-def/src/macro_expansion_tests
- hir-expand/src
2 files changed
+8
-11
lines changedLines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
| 167 | + | |
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
| |||
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
175 | | - | |
| 176 | + | |
| 177 | + | |
176 | 178 | | |
177 | 179 | | |
178 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
391 | 386 | | |
392 | 387 | | |
393 | 388 | | |
| |||
0 commit comments