]> git.lizzy.rs Git - rust.git/blob - src/test/ui/resolve/use_suggestion_placement.fixed
Rollup merge of #97812 - TaKO8Ki:suggest-to-swap-struct-and-trait, r=estebank
[rust.git] / src / test / ui / resolve / use_suggestion_placement.fixed
1 // run-rustfix
2 #![allow(dead_code)]
3
4 use m::A;
5
6 use std::collections::HashMap;
7
8 macro_rules! y {
9     () => {}
10 }
11
12 mod m {
13     pub const A: i32 = 0;
14 }
15
16 mod foo {
17     use std::path::Path;
18
19 #[derive(Debug)]
20     pub struct Foo;
21
22     // test whether the use suggestion isn't
23     // placed into the expansion of `#[derive(Debug)]
24     type Bar = Path; //~ ERROR cannot find
25 }
26
27 fn main() {
28     y!();
29     let _ = A; //~ ERROR cannot find
30     foo();
31 }
32
33 fn foo() {
34     type Dict<K, V> = HashMap<K, V>; //~ ERROR cannot find
35 }