]> git.proxmox.com Git - rustc.git/blob - src/test/ui/resolve/use_suggestion_placement.fixed
New upstream version 1.55.0+dfsg1
[rustc.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 // FIXME: UsePlacementFinder is broken because active attributes are
18 // removed, and thus the `derive` attribute here is not in the AST.
19 // An inert attribute should work, though.
20 // #[derive(Debug)]
21 use std::path::Path;
22
23 #[allow(warnings)]
24 pub struct Foo;
25
26 // test whether the use suggestion isn't
27 // placed into the expansion of `#[derive(Debug)]
28 type Bar = Path; //~ ERROR cannot find
29 }
30
31 fn main() {
32 y!();
33 let _ = A; //~ ERROR cannot find
34 foo();
35 }
36
37 fn foo() {
38 type Dict<K, V> = HashMap<K, V>; //~ ERROR cannot find
39 }