diff options
| author | bors <bors@rust-lang.org> | 2020-06-21 02:20:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-06-21 02:20:07 +0000 |
| commit | 228a0ed7b0cef2fbfeb781acf6c23015ccc40ba2 (patch) | |
| tree | cf060cf92c6f6b8c9ca560cc62f1a78e618c58fe /library/std/src/sys/windows/stack_overflow_uwp.rs | |
| parent | 7058471adec80a2a1e6092443e08546768c9c894 (diff) | |
| parent | 556b7baca2cd45a78b1a9a762b4bf66b69747e53 (diff) | |
| download | rust-228a0ed7b0cef2fbfeb781acf6c23015ccc40ba2.tar.gz rust-228a0ed7b0cef2fbfeb781acf6c23015ccc40ba2.zip | |
Auto merge of #70946 - jumbatm:clashing-extern-decl, r=nagisa
Add a lint to catch clashing `extern` fn declarations. Closes #69390. Adds lint `clashing_extern_decl` to detect when, within a single crate, an extern function of the same name is declared with different types. Because two symbols of the same name cannot be resolved to two different functions at link time, and one function cannot possibly have two types, a clashing extern declaration is almost certainly a mistake. This lint does not run between crates because a project may have dependencies which both rely on the same extern function, but declare it in a different (but valid) way. For example, they may both declare an opaque type for one or more of the arguments (which would end up distinct types), or use types that are valid conversions in the language the extern fn is defined in. In these cases, we can't say that the clashing declaration is incorrect. r? @eddyb
Diffstat (limited to 'library/std/src/sys/windows/stack_overflow_uwp.rs')
0 files changed, 0 insertions, 0 deletions
