Closed
Description
Code
// check-pass: this used to be a stack overflow because of recursion in `usefulness.rs`
macro_rules! long_tuple_arg {
([$($t:tt)*]#$($h:tt)*) => {
long_tuple_arg!{[$($t)*$($t)*]$($h)*}
};
([$([$t:tt $y:tt])*]) => {
pub fn _f(($($t,)*): ($($t,)*)) {}
}
}
long_tuple_arg!{[[_ u8]]#}
fn main() {}
Minimal
macro_rules! foo {
($ty:ty) => {
fn foo(_: $ty, _: $ty) {}
}
}
foo!(_);
fn main() {}
Meta
rustc --version --verbose
:
33688d24673db07df084483cbcf0b6bc569ea33a
Error output
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
--> 5A2D2B75C2BF81E687B5271EF31D0BB4F73D27EFD91EEA26ABC563EAC0B84418.rs:12:19
|
12 | long_tuple_arg!{[[_ u8]]#}
| ^
| |
| not allowed in type signatures
| not allowed in type signatures
|
help: use type parameters instead
|
8 ~ pub fn _f<T>(($($t,)*): ($($t,)*)) {}
9 | }
10 | }
11 |
12 ~ long_tuple_arg!{[[TT u8]]#}
|
error: aborting due to previous error
For more information about this error, try `rustc --explain E0121`.
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsCategory: This is a bug.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Relevant to the compiler team, which will review and decide on the PR/issue.This issue requires a build of rustc or tooling with debug-assertions in some way