]> git.lizzy.rs Git - rust.git/blob - tests/ui/single_component_path_imports.rs
iterate List by value
[rust.git] / tests / ui / single_component_path_imports.rs
1 // run-rustfix
2 // edition:2018
3 #![warn(clippy::single_component_path_imports)]
4 #![allow(unused_imports)]
5
6 use regex;
7 use serde as edres;
8 pub use serde;
9
10 macro_rules! m {
11     () => {
12         use regex;
13     };
14 }
15
16 fn main() {
17     regex::Regex::new(r"^\d{4}-\d{2}-\d{2}$").unwrap();
18
19     // False positive #5154, shouldn't trigger lint.
20     m!();
21 }