

Emit clearer diagnostics for parens around `for` loop heads by JohnTitor · Pull...
source link: https://github.com/rust-lang/rust/pull/86422
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Left one nitpick. r=me with that addressed. Apologies for the delay.
.span_label(begin_par_sp, "opening `(`")
let sp = MultiSpan::from_spans(vec![begin_par_sp, self.prev_token.span]);
self.struct_span_err(sp, "unexpected parenthesis surrounding `for` loop head")
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK