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