Commit 22a10e1
committed
lint: treat binders in improper_ctypes instead of ICE
This replaces the in the improper_ctypes
lint with a proper diagnostic. Previously, using an binder inside
an block caused an internal compiler error.
Now the lint emits an FFI-safe diagnostic explaining that binders
are not yet supported in FFI.
Includes a new UI test to ensure the behavior stays stable.1 parent ba86c04 commit 22a10e1
File tree
3 files changed
+34
-2
lines changed- compiler/rustc_lint/src/types
- tests/ui/lint/improper-ctypes
3 files changed
+34
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
669 | 669 | | |
670 | 670 | | |
671 | 671 | | |
672 | | - | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
673 | 682 | | |
674 | 683 | | |
675 | 684 | | |
| |||
1016 | 1025 | | |
1017 | 1026 | | |
1018 | 1027 | | |
1019 | | - | |
1020 | 1028 | | |
1021 | 1029 | | |
1022 | 1030 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments