Stream: t-compiler/help

Topic: debug!()


blitzerr (Mar 09 2019 at 03:42, on Zulip):

debug! automatically adds the timestamp but not the line number that inserts the debug text. Is it a deliberate choice ?

simulacrum (Mar 09 2019 at 04:18, on Zulip):

@blitzerr Yep, if you want the reverse (line number but no timestamp) you could use the dbg macro, e.g. https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=c49c663aea9b9b6c586cedbefbbc6ea3

simulacrum (Mar 09 2019 at 04:19, on Zulip):

debug! comes from log by the way (and is pretty standard across the ecosystem)

blitzerr (Mar 09 2019 at 04:45, on Zulip):

Thanks a lot @simulacrum. I was not trying to add new debug! but was trying to dump the ones that are already sprinkled all over rustc code. I was trying to understand why debug! was not generating line numbers but I guess the fact that it uses log underneath, would explain why. Thanks a lot.

Last update: Nov 11 2019 at 22:05UTC