rust/tests/ui/parser/macro/trait-non-item-macros.rs
Nicholas Nethercote 49ed25b5d2 Remove NtExpr and NtLiteral.
Notes about tests:
- tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.rs: some messages are
  now duplicated due to repeated parsing.

- tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.rs: ditto.

- `tests/ui/proc-macro/macro-rules-derive-cfg.rs`: the diff looks large
  but the only difference is the insertion of a single
  invisible-delimited group around a metavar.

- `tests/ui/attributes/nonterminal-expansion.rs`: a slight span
  degradation, somehow related to the recent massive attr parsing
  rewrite (#135726). I couldn't work out exactly what is going wrong,
  but I don't think it's worth holding things up for a single slightly
  suboptimal error message.
2025-04-02 06:20:35 +11:00

14 lines
243 B
Rust

macro_rules! bah {
($a:expr) => {
$a
}; //~^ ERROR macro expansion ignores `expr` metavariable and any tokens following
}
trait Bar {
bah!(2);
}
fn main() {
let _recovery_witness: () = 0; //~ ERROR mismatched types
}