I'm trying to do some debugging, but when I run
RUSTC_LOG=rustc_mir=debug rustc +stage1 test/ui/async-await/issues/issue-63388-1.rs I don't get any debugging output
If I run with
RUSTC_LOG=debug I get plenty of output, but it is all from libsyntax_pos, librustc
Am I doing something stupid?
I made sure debug-assertions=true and I recompiled stage1 from clean
@mark-i-m I think that should work ... hmmm, can you try
RUSTC_LOG=rustc_mir rustc +stage1 test/ui/async-await/issues/issue-63388-1.rs?
sorry, I did not understand if
RUSTC_LOG=debug ... worked or not
did you get debug info from
rustc_mir? maybe search for that in the output?
Oh, sorry, I see how that could be miss understood
RUSTC_LOG=rustc_mir gives nothing
RUSTC_LOG=debug gives _no_ output from rustc_mir
It also doesn't work with stage 2
@mark-i-m I was checking a bit the code because I was not sure how are logs in general enabled but it shouldn't be related to
debug-assertions or anything like that
my understanding is that it just uses the env variable to initialize the loggers in the level you use on the env variable and that's all
debug-assertions are about turning on debug-assert in non optimized builds
if debug-asserts aren't on you can't get more verbose logs than just info
debug! logs are gated behind debug-assert = true so that they're completely compiled out in dist builds
I see, makes sense, couldn't find how that happens on the code though
Yeah, I wanted debug! messages, so I turned on debug-assert
It turned out that 1) I needed to pass
--edition 2018 to the compiler, and 2) I needed to add
#![feature(nll)] to the test case
I was under the impression that the nll borrow checker was always running, so this is still a bit perplexing to me...
In particular, if nll is on by default, what does the feature gate do? And what does edition 2015 do differently?
probably related to the migrate-mode
while the feature gate turns on "full NLLs"