1
1
error: expected type, found `{`
2
- --> $DIR/macro-fail.rs:31 :27
2
+ --> $DIR/macro-fail.rs:30 :27
3
3
|
4
4
LL | fn make_marker() -> impl Marker<gimme_a_const!(marker)> {
5
5
| ----------------------
@@ -13,7 +13,7 @@ LL | ($rusty: ident) => {{ let $rusty = 3; *&$rusty }}
13
13
= note: this error originates in the macro `gimme_a_const` (in Nightly builds, run with -Z macro-backtrace for more info)
14
14
15
15
error: expected type, found `{`
16
- --> $DIR/macro-fail.rs:31 :27
16
+ --> $DIR/macro-fail.rs:30 :27
17
17
|
18
18
LL | Example::<gimme_a_const!(marker)>
19
19
| ----------------------
@@ -41,7 +41,7 @@ LL | let _fail = Example::<external_macro!()>;
41
41
= note: this error originates in the macro `external_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
42
42
43
43
error: unexpected end of macro invocation
44
- --> $DIR/macro-fail.rs:42 :25
44
+ --> $DIR/macro-fail.rs:41 :25
45
45
|
46
46
LL | macro_rules! gimme_a_const {
47
47
| -------------------------- when calling this macro
@@ -50,7 +50,7 @@ LL | let _fail = Example::<gimme_a_const!()>;
50
50
| ^^^^^^^^^^^^^^^^ missing tokens in macro arguments
51
51
|
52
52
note: while trying to match meta-variable `$rusty:ident`
53
- --> $DIR/macro-fail.rs:31 :8
53
+ --> $DIR/macro-fail.rs:30 :8
54
54
|
55
55
LL | ($rusty: ident) => {{ let $rusty = 3; *&$rusty }}
56
56
| ^^^^^^^^^^^^^
@@ -75,32 +75,20 @@ error[E0747]: type provided when a constant was expected
75
75
LL | Example::<gimme_a_const!(marker)>
76
76
| ^^^^^^^^^^^^^^^^^^^^^^
77
77
78
- error[E0284]: type annotations needed
79
- --> $DIR/macro-fail.rs:17:3
80
- |
81
- LL | Example::<gimme_a_const!(marker)>
82
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer the value of the const parameter `N` declared on the struct `Example`
83
- |
84
- note: required by a const generic parameter in `Example`
85
- --> $DIR/macro-fail.rs:1:16
86
- |
87
- LL | struct Example<const N: usize>;
88
- | ^^^^^^^^^^^^^^ required by this const generic parameter in `Example`
89
-
90
78
error[E0747]: type provided when a constant was expected
91
- --> $DIR/macro-fail.rs:38 :25
79
+ --> $DIR/macro-fail.rs:37 :25
92
80
|
93
81
LL | let _fail = Example::<external_macro!()>;
94
82
| ^^^^^^^^^^^^^^^^^
95
83
96
84
error[E0747]: type provided when a constant was expected
97
- --> $DIR/macro-fail.rs:42 :25
85
+ --> $DIR/macro-fail.rs:41 :25
98
86
|
99
87
LL | let _fail = Example::<gimme_a_const!()>;
100
88
| ^^^^^^^^^^^^^^^^
101
89
102
90
error[E0284]: type annotations needed for `Example<_>`
103
- --> $DIR/macro-fail.rs:38 :7
91
+ --> $DIR/macro-fail.rs:37 :7
104
92
|
105
93
LL | let _fail = Example::<external_macro!()>;
106
94
| ^^^^^ ---------------------------- type must be known at this point
@@ -116,7 +104,7 @@ LL | let _fail: Example<N> = Example::<external_macro!()>;
116
104
| ++++++++++++
117
105
118
106
error[E0284]: type annotations needed for `Example<_>`
119
- --> $DIR/macro-fail.rs:42 :7
107
+ --> $DIR/macro-fail.rs:41 :7
120
108
|
121
109
LL | let _fail = Example::<gimme_a_const!()>;
122
110
| ^^^^^ --------------------------- type must be known at this point
@@ -131,7 +119,7 @@ help: consider giving `_fail` an explicit type, where the value of const paramet
131
119
LL | let _fail: Example<N> = Example::<gimme_a_const!()>;
132
120
| ++++++++++++
133
121
134
- error: aborting due to 12 previous errors
122
+ error: aborting due to 11 previous errors
135
123
136
124
Some errors have detailed explanations: E0284, E0747.
137
125
For more information about an error, try `rustc --explain E0284`.
0 commit comments