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
Summary: A library might want to have a single private type-parametric struct that is only exposed via a collection of named instantiations of that struct. The dead_code lint is issuing a false warning about dead code that is in fact reachable from the library via the re-exported type alias.
Consider the following library and client-code pair:
This ensures that a public typedef to a private item is ensured to be public in
terms of linkage. This affects both the visibility of the library's symbols as
well as other lints based on privacy (dead_code for example).
Closesrust-lang#14421Closesrust-lang#14422
This ensures that a public typedef to a private item is ensured to be public in
terms of linkage. This affects both the visibility of the library's symbols as
well as other lints based on privacy (dead_code for example).
Closes#14421Closes#14422
Summary: A library might want to have a single private type-parametric struct that is only exposed via a collection of named instantiations of that struct. The dead_code lint is issuing a false warning about dead code that is in fact reachable from the library via the re-exported type alias.
Consider the following library and client-code pair:
bug_lib.rs:
bug_client.rs
Transcript of rustc invocation illustrated false warning (and the fact that code is not dead):
The text was updated successfully, but these errors were encountered: