mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-03-25 23:49:54 +02:00
Preserve line numbers by not injecting a newline (#2653)
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
This commit is contained in:
parent
63cc474ba0
commit
63d716de90
@ -130,7 +130,7 @@ function playground_text(playground, hidden = true) {
|
||||
// Unless the code block has `warnunused`, allow all "unused" lints to avoid cluttering
|
||||
// the output.
|
||||
if(!classes.contains("warnunused")) {
|
||||
text = '#![allow(unused)]\n' + text;
|
||||
text = '#![allow(unused)] ' + text;
|
||||
}
|
||||
let edition = "2015";
|
||||
if(classes.contains("edition2018")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user