When compiling some code, I got the lint:
note: this error originates in the attribute macro `axum::debug_handler` (in Nightly builds, run with -Z macro-backtrace for more info)
but when executing cargo -Z help
with the nighly toolchain the flag doesn't show up. Is this a problem in the compiler that I should report, or is it a problem on my side?
Should be a flag for rustc
, not cargo
. I’m not 100% certain off the top of my head what the proper way to set this one for a cargo
invocation is, but you could try e.g. via setting the RUSTFLAGS
environment variable.
Edit: This StackOverflow answer seems to agree with my guess here, so at least for Linux, the syntax on the command line would be to call something like “RUSTFLAGS="-Z macro-backtrace" cargo +nightly check
” (or feel free to use other subcommands like build
or run
; leave out the +nightly
if it’s already default anyways; etc…).
1 Like