rust-clippy/tests/ui/pub_use.rs

16 lines
252 B
Rust
Raw Normal View History

2022-04-12 09:09:34 +00:00
#![warn(clippy::pub_use)]
#![allow(unused_imports)]
#![no_main]
pub mod outer {
mod inner {
pub struct Test {}
}
// should be linted
pub use inner::Test;
//~^ ERROR: using `pub use`
2022-04-12 09:09:34 +00:00
}
// should not be linted
use std::fmt;