Closed
Description
We encountered an issue that starting with nightly-2025-02-23, the async-usercalls
crate fails to compile. We managed to come up with a minimal working run-make test, and found that the issue was introduced by commit 76b04437be91069260c72a6d59d130a4e127a9a8
as part of #133436.
Code
See this branch for a run-make test. Starting from nightly-2025-02-23
this fails with:
error: no rules expected `ty` metavariable
--> two/src/main.rs:9:13
|
4 | macro_rules! type_matcher {
| ------------------------- when calling this macro
...
9 | let _x: call_with_type!(type_matcher) = 42;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no rules expected this token in macro call
|
note: while trying to match `u64`
--> two/src/main.rs:5:6
|
5 | (u64) => { u64 };
| ^^^
= note: captured metavariables except for `:tt`, `:ident` and `:lifetime` cannot be compared to other tokens
= note: see <https://doc.rust-lang.org/nightly/reference/macros-by-example.html#forwarding-a-matched-fragment> for more information
= help: try using `:tt` instead in the macro definition
= note: this error originates in the macro `call_with_type` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types
--> two/src/main.rs:9:45
|
9 | let _x: call_with_type!(type_matcher) = 42;
| ----------------------------- ^^ expected `()`, found integer
| |
| expected due to this
For more information about this error, try `rustc --explain E0308`.
error: could not compile `two` (bin "two") due to 2 previous errors