Skip to content

panic location counts tabs as four columns instead of one #148284

@edwloef

Description

@edwloef

I tried this code (note that indentation is in tabs, not spaces):

fn main() {
	panic!();
}

I expected to see this happen:

thread 'main' panicked at src/main.rs:2:2:
explicit panic

Instead, this happened:

thread 'main' panicked at src/main.rs:2:5:
explicit panic

Meta

rustc --version --verbose:

rustc 1.90.0 (1159e78c4 2025-09-14)
binary: rustc
commit-hash: 1159e78c4747b02ef996e55082b704c09b970588
commit-date: 2025-09-14
host: x86_64-unknown-linux-gnu
release: 1.90.0
LLVM version: 20.1.8
Backtrace

<backtrace>

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)A-panicArea: Panicking machineryC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions