]> git.lizzy.rs Git - rust.git/commit
Auto merge of #21495 - richo:unexported-unmangled-lint, r=alexcrichton
authorbors <bors@rust-lang.org>
Fri, 30 Jan 2015 19:56:34 +0000 (19:56 +0000)
committerbors <bors@rust-lang.org>
Fri, 30 Jan 2015 19:56:34 +0000 (19:56 +0000)
commit1d00c545ede609b9d43fdf9f252c15da5a66dac7
tree1cbaa6abcc3877b3c9893bc8b5e09f0acb3c37d7
parent3fbfad3519af1bf5dd903f6032265da0351862ea
parentff25fd660ac7240f4c8379e74108a462a9aaba77
Auto merge of #21495 - richo:unexported-unmangled-lint, r=alexcrichton

The usecase is that functions made visible to systems outside of the
rust ecosystem require the symbol to be visible.

This adds a lint for functions that are not exported, but also not mangled.

It has some gotchas:

[ ]: There is fallout in core that needs taking care of
[ ]: I'm not convinced the error message is correct
[ ]: It has no tests

~~However, there's an underlying issue which I'd like feedback on- which is that my belief that that non-pub functions would not have their symbols exported, however that seems not to be the case in the first case that this lint turned up in rustc (`rust_fail`), which intuition suggests has been working.~~

This seems to be a separate bug in rust, wherein the symbols are exported in binaries, but not in rlibs or dylibs. This lint would catch that case.
src/librustc/lint/builtin.rs