Commit 12d5e1d
committed
Fix small bug with variant fields
Previously, they would be resolved as `DefKind::Variant`, and since they
resolved successfully, passed through to `resolve_associated_item`.
Then, if resolve_associated_item couldn't handle them,
it would pass `path_str` to `variant_field`.
But after my change, it no longer had access to `path_str` - all it had
was `item_str`, which is only one path segment long. So it would never
resolve through `variant_field`.
This skips straight to `variant_field` if the path resolved to a
variant.1 parent 2039c41 commit 12d5e1d
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
| 314 | + | |
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
| 322 | + | |
322 | 323 | | |
323 | 324 | | |
324 | 325 | | |
325 | 326 | | |
326 | 327 | | |
327 | 328 | | |
328 | 329 | | |
| 330 | + | |
329 | 331 | | |
330 | 332 | | |
331 | 333 | | |
| |||
538 | 540 | | |
539 | 541 | | |
540 | 542 | | |
| 543 | + | |
541 | 544 | | |
542 | 545 | | |
543 | 546 | | |
544 | 547 | | |
545 | 548 | | |
546 | 549 | | |
| 550 | + | |
547 | 551 | | |
548 | 552 | | |
549 | 553 | | |
| |||
0 commit comments