summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/suggest-ref-macro.rs
blob: 6f780f32a147b69968f70529dcc9eb1e22a699bd (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 123
    };
    ($v:expr) => {
        x($v)
    }
}

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