Commit d0fb971
authored
Rollup merge of #135425 - compiler-errors:not-conditionally-const, r=RalfJung
Do not consider traits that have unsatisfied const conditions to be conditionally const
This will improve error messages as we continue to constify traits, since we don't want to start calling things "conditionally const" if they aren't implemented with a const impl anyways.
The only case that this affects today is `Deref` since that's one of the only constified traits in the standard library :)
r? RalfJungFile tree
6 files changed
+34
-26
lines changed- compiler/rustc_const_eval/src/check_consts
- tests/ui
- issues
- self
- traits/const-traits
6 files changed
+34
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
38 | 44 | | |
39 | 45 | | |
40 | 46 | | |
| |||
376 | 382 | | |
377 | 383 | | |
378 | 384 | | |
379 | | - | |
| 385 | + | |
380 | 386 | | |
381 | 387 | | |
382 | | - | |
| 388 | + | |
383 | 389 | | |
384 | 390 | | |
385 | 391 | | |
386 | 392 | | |
387 | | - | |
| 393 | + | |
388 | 394 | | |
389 | 395 | | |
390 | 396 | | |
| |||
413 | 419 | | |
414 | 420 | | |
415 | 421 | | |
416 | | - | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
417 | 425 | | |
418 | 426 | | |
| 427 | + | |
419 | 428 | | |
420 | | - | |
421 | | - | |
422 | 429 | | |
423 | 430 | | |
424 | 431 | | |
| |||
706 | 713 | | |
707 | 714 | | |
708 | 715 | | |
709 | | - | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
710 | 720 | | |
711 | 721 | | |
712 | 722 | | |
| |||
730 | 740 | | |
731 | 741 | | |
732 | 742 | | |
733 | | - | |
| 743 | + | |
734 | 744 | | |
735 | 745 | | |
736 | 746 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
13 | 18 | | |
14 | | - | |
15 | | - | |
16 | | - | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
20 | | - | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | 9 | | |
13 | 10 | | |
14 | 11 | | |
| |||
30 | 27 | | |
31 | 28 | | |
32 | 29 | | |
33 | | - | |
34 | | - | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 8 | | |
12 | 9 | | |
13 | 10 | | |
| |||
22 | 19 | | |
23 | 20 | | |
24 | 21 | | |
25 | | - | |
| 22 | + | |
| 23 | + | |
0 commit comments