-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Commit 4edfeb2
compiler: Include span of too huge enum with -Cdebuginfo=2
We have a ui test to ensure we emit an error if we encounter too big
enums. Before this fix, compiling the test with `-Cdebuginfo=2` would
not include the span of the instantiation site, because the error is
then emitted from a different code path that does not include the span.
Propagate the span to the error also in the debuginfo case, so the test
passes regardless of debuginfo level.1 parent 1f7dcc8 commit 4edfeb2
File tree
6 files changed
+33
-10
lines changed- compiler/rustc_codegen_llvm/src/debuginfo
- metadata/enums
- tests/ui/limits
6 files changed
+33
-10
lines changedLines changed: 12 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 | - | ||
22 | + | ||
23 | + | ||
24 | + | ||
23 | 25 |
| |
24 | 26 |
| |
25 | 27 |
| |
| |||
423 | 425 |
| |
424 | 426 |
| |
425 | 427 |
| |
428 | + | ||
429 | + | ||
430 | + | ||
431 | + | ||
432 | + | ||
433 | + | ||
434 | + | ||
435 | + | ||
426 | 436 |
| |
427 | 437 |
| |
428 | 438 |
| |
| |||
460 | 470 |
| |
461 | 471 |
| |
462 | 472 |
| |
463 | - | ||
473 | + | ||
464 | 474 |
| |
465 | 475 |
| |
466 | 476 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 | - | ||
13 | + | ||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
33 | + | ||
33 | 34 |
| |
34 | 35 |
| |
35 | 36 |
| |
36 | 37 |
| |
37 | 38 |
| |
38 | 39 |
| |
39 | - | ||
40 | + | ||
40 | 41 |
| |
41 | 42 |
| |
42 | 43 |
| |
|
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
31 | - | ||
31 | + | ||
32 | + | ||
33 | + | ||
32 | 34 |
| |
33 | 35 |
| |
34 | 36 |
| |
| |||
626 | 628 |
| |
627 | 629 |
| |
628 | 630 |
| |
629 | - | ||
631 | + | ||
630 | 632 |
| |
631 | 633 |
| |
632 | 634 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | - | ||
2 | + | ||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + |
Lines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
1 | 4 |
| |
2 | 5 |
| |
3 | 6 |
| |
4 | - | ||
5 | - | ||
6 | - | ||
7 | + | ||
8 | + | ||
7 | 9 |
| |
8 | 10 |
| |
9 | 11 |
| |
|
0 commit comments