Skip to content

format! error has wrong span when using encoded { #102057

Description

@Nemo157

I tried this code:

format!("\x7Ba}")

I expected to see this happen: a "no value found" error pointing at the a token

Instead, this happened: a "no value found" error pointing at the x7Ba:

error[E0425]: cannot find value `a` in this scope
 --> src/main.rs:2:11
  |
2 | format!("\x7Ba}")
  |           ^^^^ not found in this scope

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsA-fmtArea: `core::fmt`C-bugCategory: This is a bug.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions