| 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
 | #![feature(macro_metavar_expr_concat)]
macro_rules! idents_01 {
    ($rhs:ident) => {
        let ${concat(abc, $rhs)}: () = ();
        //~^ ERROR `${concat(..)}` currently does not support raw identifiers
    };
}
macro_rules! idents_10 {
    ($lhs:ident) => {
        let ${concat($lhs, abc)}: () = ();
        //~^ ERROR `${concat(..)}` currently does not support raw identifiers
    };
}
macro_rules! idents_11 {
    ($lhs:ident, $rhs:ident) => {
        let ${concat($lhs, $rhs)}: () = ();
        //~^ ERROR `${concat(..)}` currently does not support raw identifiers
        //~| ERROR `${concat(..)}` currently does not support raw identifiers
        //~| ERROR `${concat(..)}` currently does not support raw identifiers
    };
}
macro_rules! no_params {
    () => {
        let ${concat(r#abc, abc)}: () = ();
        //~^ ERROR `${concat(..)}` currently does not support raw identifiers
        //~| ERROR expected pattern, found `$`
        let ${concat(abc, r#abc)}: () = ();
        //~^ ERROR `${concat(..)}` currently does not support raw identifiers
        let ${concat(r#abc, r#abc)}: () = ();
        //~^ ERROR `${concat(..)}` currently does not support raw identifiers
    };
}
macro_rules! tts_01 {
    ($rhs:tt) => {
        let ${concat(abc, $rhs)}: () = ();
        //~^ ERROR `${concat(..)}` currently does not support raw identifiers
    };
}
macro_rules! tts_10 {
    ($lhs:tt) => {
        let ${concat($lhs, abc)}: () = ();
        //~^ ERROR `${concat(..)}` currently does not support raw identifiers
    };
}
macro_rules! tts_11 {
    ($lhs:tt, $rhs:tt) => {
        let ${concat($lhs, $rhs)}: () = ();
        //~^ ERROR `${concat(..)}` currently does not support raw identifiers
        //~| ERROR `${concat(..)}` currently does not support raw identifiers
        //~| ERROR `${concat(..)}` currently does not support raw identifiers
    };
}
fn main() {
    idents_01!(r#_c);
    idents_10!(r#_c);
    idents_11!(r#_c, d);
    idents_11!(_e, r#f);
    idents_11!(r#_g, r#h);
    tts_01!(r#_c);
    tts_10!(r#_c);
    tts_11!(r#_c, d);
    tts_11!(_e, r#f);
    tts_11!(r#_g, r#h);
    no_params!();
}
 |