Commit 92408df
committed
lint ImproperCTypes: change what elements are being checked [...]
- do not check ADT definitions themselves, it turns out `repr(C)` is not
a strong enough signal to determine if something is designed for FFIs
- however, start checking static variables with `#[no_mangle]` or
`#[export_name=_]`, even if that's not a perfect signal due to the
lack of specified ABI
- some changes to the LLVM codegen so it can be seen as FFI-safe1 parent dc751e9 commit 92408df
File tree
9 files changed
+385
-239
lines changed- compiler
- rustc_codegen_llvm/src
- back
- llvm
- rustc_lint/src
- types
- tests/ui
- layout
- lint/improper_ctypes
- statics
9 files changed
+385
-239
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
465 | | - | |
| 465 | + | |
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
| 469 | + | |
469 | 470 | | |
470 | 471 | | |
471 | 472 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | | - | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
42 | | - | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| |||
0 commit comments