Change:
<!-- [31mICE[0m: Rustc '--crate-type=lib -ooutputfile -Zdump-mir-dir=dir' 'error: internal compiler error: not a tail expression', 'error: internal compiler error: not a tail expression' File: --auto-reduced (treereduce-rust): original: Version information ` Command: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongProgram output</strong</summary<p</p</details<!-- query stack: --<!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
It seems the pops up since cc The code starts ICEing in general since cc
claim

Discussion:
{ Ok(next_attr) => next_attr, Err(inner_err) => { <del> err.cancel(); </del> inner_err.cancel(); <del> return self.dcx().span_delayed_bug(expr.span, "not a tail expression"); </del> <ins> return err.emit(); </ins> } } && let ast::AttrKind::Normal(next_attr_kind) = next_attr.kind

let next_expr = match snapshot.parse_expr() { Ok(next_expr) => next_expr, Err(inner_err) => { <del> err.cancel(); </del> inner_err.cancel(); <del> return self.dcx().span_delayed_bug(expr.span, "not a tail expression"); </del> <ins> return err.emit(); </ins> } }; // We have for sure

<ins> // Issue #118164: recovery path leaving unemitted error behind fn bar() -> String { #[cfg(feature = )] [1, 2, 3].iter().map().collect::<String>() //~ ERROR expected `;`, found `#` #[attr] //~ ERROR expected statement after outer attribute } fn main() { let _ = bar(); } </ins>

<ins> error: expected `;`, found `#` --> $DIR/properly-recover-from-trailing-outer-attribute-in-body-1.rs:4:47 | LL |     #[cfg(feature = )] |     ------------------ only `;` terminated statements or tail expressions are allowed after this attribute LL |     [1, 2, 3].iter().map().collect::<String>() |                                               ^ expected `;` here LL |     #[attr] |     - unexpected token | help: add `;` here | LL |     [1, 2, 3].iter().map().collect::<String>(); |                                               + help: alternatively, consider surrounding the expression with a block | LL |     { [1, 2, 3].iter().map().collect::<String>() } |     +                                            + error: expected statement after outer attribute --> $DIR/properly-recover-from-trailing-outer-attribute-in-body-1.rs:5:5 | LL |     #[attr] |     ^^^^^^^ error: aborting due to 2 previous errors </ins>

<ins> // Issue #121647: recovery path leaving unemitted error behind macro_rules! the_macro { ( $foo:stmt ; $bar:stmt ; ) => { #[cfg()] $foo //~ ERROR expected `;`, found `#` #[cfg(bar)] $bar }; } fn main() { the_macro!( (); (); ); } </ins>

<ins> error: expected `;`, found `#` --> $DIR/properly-recover-from-trailing-outer-attribute-in-body-2.rs:6:13 | LL |         #[cfg()] |         -------- only `;` terminated statements or tail expressions are allowed after this attribute LL |         $foo |             ^ expected `;` here LL | LL |         #[cfg(bar)] |         - unexpected token ... LL |     the_macro!( (); (); ); |     --------------------- in this macro invocation | = note: this error originates in the macro `the_macro` (in Nightly builds, run with -Z macro-backtrace for more info) help: add `;` here | LL |         $foo; |             + help: alternatively, consider surrounding the expression with a block | LL |     the_macro!( { () }; (); ); |                 +    + error: aborting due to 1 previous error </ins>

<del> // Issue #118164: recovery path leaving unemitted error behind fn bar() -> String { #[cfg(feature = )] [1, 2, 3].iter().map().collect::<String>() //~ ERROR expected `;`, found `#` #[attr] //~ ERROR expected statement after outer attribute } fn main() { let _ = bar(); } </del>

<del> error: expected `;`, found `#` --> $DIR/properly-recover-from-trailing-outer-attribute-in-body.rs:4:47 | LL |     #[cfg(feature = )] |     ------------------ only `;` terminated statements or tail expressions are allowed after this attribute LL |     [1, 2, 3].iter().map().collect::<String>() |                                               ^ expected `;` here LL |     #[attr] |     - unexpected token | help: add `;` here | LL |     [1, 2, 3].iter().map().collect::<String>(); |                                               + help: alternatively, consider surrounding the expression with a block | LL |     { [1, 2, 3].iter().map().collect::<String>() } |     +                                            + error: expected statement after outer attribute --> $DIR/properly-recover-from-trailing-outer-attribute-in-body.rs:5:5 | LL |     #[attr] |     ^^^^^^^ error: aborting due to 2 previous errors </del>