File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 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 ( ) { }
Original file line number Diff line number Diff line change 1+ error[E0282]: type annotations needed
2+ --> $DIR/macro-rules-capture.rs:16:24
3+ |
4+ LL | reemit! { foo => 45u32.into() }
5+ | ------^^^^--
6+ | | |
7+ | | cannot infer type for type parameter `T` declared on the trait `Into`
8+ | this method call resolves to `T`
9+
10+ error: aborting due to previous error
11+
12+ For more information about this error, try `rustc --explain E0282`.
You can’t perform that action at this time.
0 commit comments