]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/5131_module.rs
Rollup merge of #95040 - frank-king:fix/94981, r=Mark-Simulacrum
[rust.git] / src / tools / rustfmt / tests / target / 5131_module.rs
1 // rustfmt-imports_granularity: Module
2
3 #![allow(dead_code)]
4
5 mod a {
6     pub mod b {
7         pub struct Data {
8             pub a: i32,
9         }
10     }
11
12     use crate::a::b::{Data, Data as Data2};
13
14     pub fn data(a: i32) -> Data {
15         Data { a }
16     }
17
18     pub fn data2(a: i32) -> Data2 {
19         Data2 { a }
20     }
21
22     #[cfg(test)]
23     mod tests {
24         use super::*;
25
26         #[test]
27         pub fn test() {
28             data(1);
29             data2(1);
30         }
31     }
32 }