mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
1174f78409
rustc_expand: improve diagnostics for non-repeatable metavars There was an initally opened pr which solve this issue here https://github.com/rust-lang/rust/pull/152679. It got merged but, there was a perf regression. And this new pr is opened to address the problem. The first did the computation of binding and matched_rule and then passed them as owned value down to `diagnostics::emit_frag_parse_err(` but, now this pr address the issue by passing `lhs` and `rules` as borrowed value to from_tts and the move the logic to `diagnostics::emit_frag_parse_err(`. Fix https://github.com/rust-lang/rust/issues/47452.