Skip to content

Unmatched brace in a format string crashes the compiler #91556

Closed
@VorfeedCanal

Description

@VorfeedCanal

Reproducer:

pub fn test(i: i32) -> String {
  format!(concat!("{0}𝖳𝖾𝗌𝗍{"), i)
}

Playground link: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=8b3a4c8413cd9d296706c9da0ac6e0c0

Metadata

Metadata

Labels

C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions