This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 117a28a
committed
fix(mbe): desugar doc correctly for mbe
Fixes rust-lang#16110.
The way rust desugars doc comments when expanding macros
is rendering it as raw strings delimited with hashes.
Rust-analyzer wasn't aware of this, so the desugared doc
comments wouldn't match correctly when on the LHS of macro
declarations.
This PR fixes this by porting the code used by rustc: https://github.com/rust-lang/rust/blob/4cfdbd328b7171b2328d11b950b1af0978d6b1ef/compiler/rustc_ast/src/tokenstream.rs#L68371 parent f663521 commit 117a28a
File tree
2 files changed
+22
-7
lines changed- crates
- hir-def/src/macro_expansion_tests
- mbe/src
2 files changed
+22
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1218 | 1218 | | |
1219 | 1219 | | |
1220 | 1220 | | |
1221 | | - | |
1222 | | - | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
1223 | 1225 | | |
1224 | 1226 | | |
1225 | 1227 | | |
| |||
1260 | 1262 | | |
1261 | 1263 | | |
1262 | 1264 | | |
1263 | | - | |
1264 | | - | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
1265 | 1269 | | |
1266 | 1270 | | |
1267 | 1271 | | |
| |||
1281 | 1285 | | |
1282 | 1286 | | |
1283 | 1287 | | |
1284 | | - | |
| 1288 | + | |
1285 | 1289 | | |
1286 | 1290 | | |
1287 | 1291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
410 | 421 | | |
411 | | - | |
| 422 | + | |
412 | 423 | | |
413 | 424 | | |
414 | 425 | | |
| |||
0 commit comments