Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve line numbers by not injecting a newline #2653

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

djmitche
Copy link
Collaborator

The dbg! macro, being deployed more widely in #2478, shows the line number. But if we inject #![allow(..)]\n then the printed numbers do not match those in the textarea. It turns out that \n is not required!

cc @egithinji

The `dbg!` macro, being deployed more widely in google#2478, shows the line
number. But if we inject `#![allow(..)]\n` then the printed numbers do
not match those in the textarea. It turns out that `\n` is not required!
Copy link
Collaborator

@randomPoison randomPoison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thanks for fixing this, students have gotten confused by this before.

@djmitche djmitche merged commit 63d716d into google:main Feb 21, 2025
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants