We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2af0218 commit 30c00fdCopy full SHA for 30c00fd
2 files changed
src/test/ui/proc-macro/macro-rules-capture.rs
@@ -0,0 +1,18 @@
1
+// aux-build: test-macros.rs
2
+
3
+extern crate test_macros;
4
+use test_macros::recollect_attr;
5
6
+macro_rules! reemit {
7
+ ($name:ident => $($token:expr)*) => {
8
9
+ #[recollect_attr]
10
+ pub fn $name() {
11
+ $($token)*;
12
+ }
13
14
+}
15
16
+reemit! { foo => 45u32.into() } //~ ERROR type annotations
17
18
+fn main() {}
src/test/ui/proc-macro/macro-rules-capture.stderr
@@ -0,0 +1,12 @@
+error[E0282]: type annotations needed
+ --> $DIR/macro-rules-capture.rs:16:24
+ |
+LL | reemit! { foo => 45u32.into() }
+ | ------^^^^--
+ | | |
+ | | cannot infer type for type parameter `T` declared on the trait `Into`
+ | this method call resolves to `T`
+error: aborting due to previous error
+For more information about this error, try `rustc --explain E0282`.
0 commit comments