Change:
I'm seeing the following error on the channel, but not on or : Found with the help of .
triage: P-medium. Leaving nominated so that team double-checks that priority assignment.
This is triggered here It should be possible to use the span snippet instead. I believe it was introduced in

Discussion:
Ok(Some(self.mk_item(span, ident, ItemKind::MacroDef(def), vis.clone(), attrs.to_vec()))) } <del> fn parse_stmt_without_recovery(&mut self, macro_legacy_warnings: bool) -> PResult<'a, Option<Stmt>> { </del> <ins> fn parse_stmt_without_recovery( &mut self, macro_legacy_warnings: bool, ) -> PResult<'a, Option<Stmt>> { </ins> maybe_whole!(self, NtStmt, |x| Some(x)); let attrs = self.parse_outer_attributes()?;

if self.eat(&token::Semi) { stmt_span = stmt_span.with_hi(self.prev_span.hi()); } <del> let sugg = pprust::to_string(|s| { use crate::print::pprust::INDENT_UNIT; s.ibox(INDENT_UNIT); s.bopen(); s.print_stmt(&stmt); s.bclose_maybe_open(stmt.span, false) }); e.span_suggestion( stmt_span, "try placing this code inside a block", sugg, // speculative, has been misleading in the past (closed Issue #46836) Applicability::MaybeIncorrect ); </del> <ins> if let Ok(snippet) = self.sess.source_map().span_to_snippet(stmt_span) { e.span_suggestion( stmt_span, "try placing this code inside a block", format!("{{ {} }}", snippet), // speculative, has been misleading in the past (#46836) Applicability::MaybeIncorrect, ); } </ins> } Err(mut e) => { self.recover_stmt_(SemiColonMode::Break, BlockMode::Ignore);

self.bclose_maybe_open(span, true) } <del> crate fn break_offset_if_not_bol(&mut self, n: usize, off: isize) { </del> <ins> crate fn break_offset_if_not_bol(&mut self, n: usize, off: isize) { </ins> if !self.s.is_beginning_of_line() { self.s.break_offset(n, off) } else {

--> $DIR/issue-39848.rs:8:19 | LL |         if $tgt.has_$field() {} <del> |         --                 - help: try placing this code inside a block: `{ foo(); }` </del> <ins> |         --                 - help: try placing this code inside a block: `{ ) }` </ins> |         | |         this `if` statement has a condition, but no block ...

<ins> fn main() {} fn foo(u: u8) { if u8 macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 { //~^ ERROR expected `{`, found `macro_rules` //~ ERROR this file contains an un-closed delimiter </ins>

<ins> error: this file contains an un-closed delimiter --> $DIR/issue-62554.rs:5:53 | LL | fn foo(u: u8) { if u8 macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 { |               -                       -         -                  -                  - un-closed delimiter |               |                       |         |                  | |               |                       |         |                  un-closed delimiter |               |                       |         un-closed delimiter |               un-closed delimiter     un-closed delimiter LL | LL | |                                                     ^ error: expected `{`, found `macro_rules` --> $DIR/issue-62554.rs:3:23 | LL | fn foo(u: u8) { if u8 macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 { |                 --    ^^^^^^^^^^^ expected `{` |                 | |                 this `if` statement has a condition, but no block help: try placing this code inside a block | LL | fn foo(u: u8) { if u8 { macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 { LL | LL | LL |  } | error: aborting due to 2 previous errors </ins>

|     --      ^^---- |     |       | |     |       expected `{` <del> |     |       help: try placing this code inside a block: `{ 'b: { } }` </del> <ins> |     |       help: try placing this code inside a block: `{ 'b: {} }` </ins> |     this `if` statement has a condition, but no block error: expected `{`, found `'b`

|                     ^^---- |                     | |                     expected `{` <del> |                     help: try placing this code inside a block: `{ 'b: { } }` </del> <ins> |                     help: try placing this code inside a block: `{ 'b: {} }` </ins> error: expected one of `.`, `?`, `{`, or an operator, found `'b` --> $DIR/label_break_value_illegal_uses.rs:18:17