summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/suggest-ref-macro.rs
blob: 730f5fa1b5e3de5455c4b092d78cc2eed0b15bd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// run-check
// aux-build:proc-macro-type-error.rs

extern crate proc_macro_type_error;

use proc_macro_type_error::hello;

#[hello] //~ERROR mismatched types
fn abc() {}

fn x(_: &mut i32) {}

macro_rules! bla {
    () => {
        x(123);
        //~^ ERROR mismatched types
        //~| SUGGESTION &mut
    };
    ($v:expr) => {
        x($v)
    }
}

fn main() {
    bla!();
    bla!(456);
    //~^ ERROR mismatched types
    //~| SUGGESTION &mut
}