Lint attributes have no effect on crate imports. Neither can lint-attributes affect module-space attributes of the imported items.
Consider removing them or using module-wide attributes.
#[deny(dead_code)]
extern crate foo;
#[forbid(dead_code)]
use foo::bar;
extern crate foo;
use foo::bar;
// or
#![forbid(dead_code)]
extern crate foo;
use foo::bar;