]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/single_component_path_imports.fixed
New upstream version 1.70.0+dfsg1
[rustc.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 use core;
6
7 use serde as edres;
8 pub use serde;
9 use std;
10
11 macro_rules! m {
12 () => {
13 use regex;
14 };
15 }
16
17 fn main() {
18 regex::Regex::new(r"^\d{4}-\d{2}-\d{2}$").unwrap();
19
20 // False positive #5154, shouldn't trigger lint.
21 m!();
22
23 // False positive #10549
24 let _ = self::std::io::stdout();
25 let _ = 0 as self::core::ffi::c_uint;
26 }
27
28 mod hello_mod {
29
30 #[allow(dead_code)]
31 fn hello_mod() {}
32 }
33
34 mod hi_mod {
35 use self::regex::{Regex, RegexSet};
36 use regex;
37 #[allow(dead_code)]
38 fn hi_mod() {}
39 }