]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/single_component_path_imports.fixed
Rollup merge of #100396 - chenyukang:fix-100394, r=petrochenkov
[rust.git] / src / tools / clippy / tests / ui / single_component_path_imports.fixed
1 // run-rustfix
2 #![warn(clippy::single_component_path_imports)]
3 #![allow(unused_imports)]
4
5
6 use serde as edres;
7 pub use serde;
8
9 macro_rules! m {
10     () => {
11         use regex;
12     };
13 }
14
15 fn main() {
16     regex::Regex::new(r"^\d{4}-\d{2}-\d{2}$").unwrap();
17
18     // False positive #5154, shouldn't trigger lint.
19     m!();
20 }
21
22 mod hello_mod {
23     
24     #[allow(dead_code)]
25     fn hello_mod() {}
26 }
27
28 mod hi_mod {
29     use self::regex::{Regex, RegexSet};
30     use regex;
31     #[allow(dead_code)]
32     fn hi_mod() {}
33 }