Skip to content

dbg!: also print column #114910

Closed
Closed
@matthiaskrgr

Description

@matthiaskrgr

I just found myself writing

 .map(|line| if double_ice {  dbg!(&line);   (line, ICEKind::DoubleIce) } else {  dbg!(&line);  (line, ICEKind::Ice(interestingness)) });

only to discover that the dbg macro in fact only prints the source line and not the column of the macro start or something like that 😅

[src/main.rs:1987] &line = "'  left: Align(2 bytes)' ' right: Align(4 bytes)'    assertion `left == right` failed: alignment mismatch between ABI and layout in TyAndLayout {"
[src/main.rs:1987] &line = "'  left: Align(2 bytes)' ' right: Align(4 bytes)'    assertion `left == right` failed: alignment mismatch between ABI and layout in TyAndLayout {"
[src/main.rs:1987] &line = "'  left: Align(2 bytes)' ' right: Align(4 bytes)'    assertion `left == right` failed: alignment mismatch between ABI and layout in TyAndLayout {"
[src/main.rs:1987] &line = "'  left: Align(2 bytes)' ' right: Align(4 bytes)'    assertion `left == right` failed: alignment mismatch between ABI and layout in TyAndLayout {"
[src/main.rs:1987] &line = "'  left: Align(2 bytes)' ' right: Align(4 bytes)'    assertion `left == right` failed: alignment mismatch between ABI and layout in TyAndLayout {"

Is it possible to add the column as well?

Metadata

Metadata

Assignees

Labels

C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Libs-SmallLibs issues that are considered "small" or self-containedT-libsRelevant to the library 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