|
13 | 13 |
|
14 | 14 | fn test() -> _ { 5 }
|
15 | 15 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 16 | +//~| NOTE not allowed in type signatures |
16 | 17 |
|
17 | 18 | fn test2() -> (_, _) { (5, 5) }
|
18 | 19 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
19 | 20 | //~^^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 21 | +//~| NOTE not allowed in type signatures |
| 22 | +//~| NOTE not allowed in type signatures |
20 | 23 |
|
21 | 24 | static TEST3: _ = "test";
|
22 | 25 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 26 | +//~| NOTE not allowed in type signatures |
23 | 27 |
|
24 | 28 | static TEST4: _ = 145;
|
25 | 29 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 30 | +//~| NOTE not allowed in type signatures |
26 | 31 |
|
27 | 32 | static TEST5: (_, _) = (1, 2);
|
28 | 33 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
29 | 34 | //~^^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 35 | +//~| NOTE not allowed in type signatures |
| 36 | +//~| NOTE not allowed in type signatures |
30 | 37 |
|
31 | 38 | fn test6(_: _) { }
|
32 | 39 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 40 | +//~| NOTE not allowed in type signatures |
33 | 41 |
|
34 | 42 | fn test7(x: _) { let _x: usize = x; }
|
35 | 43 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 44 | +//~| NOTE not allowed in type signatures |
36 | 45 |
|
37 | 46 | fn test8(_f: fn() -> _) { }
|
38 | 47 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 48 | +//~| NOTE not allowed in type signatures |
39 | 49 |
|
40 | 50 | struct Test9;
|
41 | 51 |
|
42 | 52 | impl Test9 {
|
43 | 53 | fn test9(&self) -> _ { () }
|
44 | 54 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 55 | + //~| NOTE not allowed in type signatures |
45 | 56 |
|
46 | 57 | fn test10(&self, _x : _) { }
|
47 | 58 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 59 | + //~| NOTE not allowed in type signatures |
48 | 60 | }
|
49 | 61 |
|
50 | 62 | impl Clone for Test9 {
|
51 | 63 | fn clone(&self) -> _ { Test9 }
|
52 | 64 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 65 | + //~| NOTE not allowed in type signatures |
53 | 66 |
|
54 | 67 | fn clone_from(&mut self, other: _) { *self = Test9; }
|
55 | 68 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 69 | + //~| NOTE not allowed in type signatures |
56 | 70 | }
|
57 | 71 |
|
58 | 72 | struct Test10 {
|
59 | 73 | a: _,
|
60 | 74 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 75 | + //~| NOTE not allowed in type signatures |
61 | 76 | b: (_, _),
|
62 | 77 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
63 | 78 | //~^^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 79 | + //~| NOTE not allowed in type signatures |
| 80 | + //~| NOTE not allowed in type signatures |
64 | 81 | }
|
65 | 82 |
|
66 | 83 | pub fn main() {
|
67 | 84 | fn fn_test() -> _ { 5 }
|
68 | 85 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 86 | + //~| NOTE not allowed in type signatures |
69 | 87 |
|
70 | 88 | fn fn_test2() -> (_, _) { (5, 5) }
|
71 | 89 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
72 | 90 | //~^^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 91 | + //~| NOTE not allowed in type signatures |
| 92 | + //~| NOTE not allowed in type signatures |
73 | 93 |
|
74 | 94 | static FN_TEST3: _ = "test";
|
75 | 95 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 96 | + //~| NOTE not allowed in type signatures |
76 | 97 |
|
77 | 98 | static FN_TEST4: _ = 145;
|
78 | 99 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 100 | + //~| NOTE not allowed in type signatures |
79 | 101 |
|
80 | 102 | static FN_TEST5: (_, _) = (1, 2);
|
81 | 103 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
82 | 104 | //~^^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 105 | + //~| NOTE not allowed in type signatures |
| 106 | + //~| NOTE not allowed in type signatures |
83 | 107 |
|
84 | 108 | fn fn_test6(_: _) { }
|
85 | 109 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 110 | + //~| NOTE not allowed in type signatures |
86 | 111 |
|
87 | 112 | fn fn_test7(x: _) { let _x: usize = x; }
|
88 | 113 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 114 | + //~| NOTE not allowed in type signatures |
89 | 115 |
|
90 | 116 | fn fn_test8(_f: fn() -> _) { }
|
91 | 117 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 118 | + //~| NOTE not allowed in type signatures |
92 | 119 |
|
93 | 120 | struct FnTest9;
|
94 | 121 |
|
95 | 122 | impl FnTest9 {
|
96 | 123 | fn fn_test9(&self) -> _ { () }
|
97 | 124 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 125 | + //~| NOTE not allowed in type signatures |
98 | 126 |
|
99 | 127 | fn fn_test10(&self, _x : _) { }
|
100 | 128 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 129 | + //~| NOTE not allowed in type signatures |
101 | 130 | }
|
102 | 131 |
|
103 | 132 | impl Clone for FnTest9 {
|
104 | 133 | fn clone(&self) -> _ { FnTest9 }
|
105 | 134 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 135 | + //~| NOTE not allowed in type signatures |
106 | 136 |
|
107 | 137 | fn clone_from(&mut self, other: _) { *self = FnTest9; }
|
108 | 138 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 139 | + //~| NOTE not allowed in type signatures |
109 | 140 | }
|
110 | 141 |
|
111 | 142 | struct FnTest10 {
|
112 | 143 | a: _,
|
113 | 144 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 145 | + //~| NOTE not allowed in type signatures |
114 | 146 | b: (_, _),
|
115 | 147 | //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
116 | 148 | //~^^ ERROR the type placeholder `_` is not allowed within types on item signatures
|
| 149 | + //~| NOTE not allowed in type signatures |
| 150 | + //~| NOTE not allowed in type signatures |
117 | 151 | }
|
118 | 152 |
|
119 | 153 | }
|
0 commit comments