Commit 8423d12
committed
lint: treat unsafe binders in improper_ctypes instead of ICE
this replaces an ICE in improper_ctypes with a proper diagnostic and ensures
consistent handling of unsafe binders in FFI contexts.
updated the diagnostic to display the full unsafe<a> &a() type
added a fluent error message for this case
adjusted UI test output for consistency1 parent ba86c04 commit 8423d12
File tree
4 files changed
+30
-3
lines changed- compiler/rustc_lint
- src/types
- tests/ui/lint/improper-ctypes
4 files changed
+30
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
364 | 363 | | |
365 | 364 | | |
366 | 365 | | |
| |||
416 | 415 | | |
417 | 416 | | |
418 | 417 | | |
| 418 | + | |
| 419 | + | |
419 | 420 | | |
420 | 421 | | |
421 | 422 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
669 | 669 | | |
670 | 670 | | |
671 | 671 | | |
672 | | - | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
673 | 675 | | |
674 | 676 | | |
675 | 677 | | |
| |||
1016 | 1018 | | |
1017 | 1019 | | |
1018 | 1020 | | |
1019 | | - | |
1020 | 1021 | | |
1021 | 1022 | | |
1022 | 1023 | | |
| |||
| 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 | + | |
| 15 | + | |
0 commit comments