You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We'll need to keep track of whether they're used in functions marked for cross-crate inlining, which may be tricky as this code isn't entirely centralized yet. I've been working towards getting it all passing through one place in base.rs so we're part of the way there...
The text was updated successfully, but these errors were encountered:
This I think needs some sort of dependency-graph-style abstraction for knowing when a function can never be called from an outside crate. Functions which can be called from outside crates are:
All functions located in exported_items
All non-generic functions called by some chain of generic functions rooted in an exported generic function.
Although that's probably not a complete list, I think to do this we need a hash of function id to a list of functions that could possibly be called, and then crawling can commence from there.
I'm also not sure if we're marking all instantiations of generic functions as internal, but we certainly can...
@huonw, that looks like an LLVM problem, and it still wouldn't matter too much because you can't cal foo by its name from an external crate, only by indexing into the FUNCS array which will just be pointers anyway.
Add `disallowed_macros` lint
Closesrust-lang#7790Fixesrust-lang#9558
`clippy_utils::def_path_res` already resolved macro definitions which is nice, it just needed a tweak to be able to disambiguate e.g. `std::vec` the module & `std::vec` the macro, and `serde::Serialize` the trait & `serde::Serialize` the derive macro
changelog: new lint: [`disallowed_macros`]
changelog: [`disallowed_methods`], [`disallowed_types`]: Fix false negative when a type/fn/macro share the same path
We'll need to keep track of whether they're used in functions marked for cross-crate inlining, which may be tricky as this code isn't entirely centralized yet. I've been working towards getting it all passing through one place in
base.rs
so we're part of the way there...The text was updated successfully, but these errors were encountered: