]> git.lizzy.rs Git - rust.git/blob - src/test/ui/resolve/use_suggestion_placement.rs
Rollup merge of #87180 - notriddle:notriddle/sidebar-keyboard-mobile, r=GuillaumeGomez
[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     // FIXME: UsePlacementFinder is broken because active attributes are
14     // removed, and thus the `derive` attribute here is not in the AST.
15     // An inert attribute should work, though.
16     // #[derive(Debug)]
17     #[allow(warnings)]
18     pub struct Foo;
19
20     // test whether the use suggestion isn't
21     // placed into the expansion of `#[derive(Debug)]
22     type Bar = Path; //~ ERROR cannot find
23 }
24
25 fn main() {
26     y!();
27     let _ = A; //~ ERROR cannot find
28     foo();
29 }
30
31 fn foo() {
32     type Dict<K, V> = HashMap<K, V>; //~ ERROR cannot find
33 }