LINKER_INFO in rustc_lint_defs::builtin - Rust
Description: The `linker_info` lint forwards warnings from the linker that are known to be informational-only.

Skip to main content

## LINKER_INFO

# Static LINKER_INFO

Source

    pub static LINKER_INFO: &Lint

Expand description

The `linker_info` lint forwards warnings from the linker that are known to be informational-only.

#### §Example

ⓘ

    #[warn(linker_info)]
    fn main () {}

On MacOS, using `-C link-arg=-lc` and the default linker, this will produce

    warning: linker stderr: ld: ignoring duplicate libraries: '-lc'
      |
    note: the lint level is defined here
     --> ex.rs:1:9
      |
    1 | #![warn(linker_info)]
      |         ^^^^^^^^^^^^^^^

#### §Explanation

Many linkers are very “chatty” and print lots of information that is not necessarily indicative of an issue. This output has been ignored for many years and is often not actionable by developers. It is silenced unless the developer specifically requests for it to be printed. See this tracking issue for more details: https://github.com/rust-lang/rust/issues/136096.