Stream: t-compiler/help

Topic: --on-fail=print-env is broken?

Joshua Nelson (Aug 09 2020 at 04:34, on Zulip):

I don't see any env vars here. Got the flag from,env#environment-variables.

error: cannot find a built-in macro with name `cfg`
    --> /home/joshua/rustc/library/core/src/macros/
1183 | /     macro_rules! cfg {
1184 | |         ($($cfg:tt)*) => {
1185 | |             /* compiler built-in */
1186 | |         };
1187 | |     }
     | |_____^

error: aborting due to previous error

error: Could not document `proc_macro`.

Caused by:
  process didn't exit successfully: `/home/joshua/rustc/build/bootstrap/debug/rustdoc --edition=2018 --crate-type lib --crate-name proc_macro library/proc_macro/src/ --target x86_64-unknown-linux-gnu -o /home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/doc --error-format=json --json=diagnostic-rendered-ansi --markdown-css rust.css --markdown-no-toc -Z unstable-options --resource-suffix 1.47.0 --index-page /home/joshua/rustc/src/doc/ -L dependency=/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage1-std/release/deps --extern std=/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libstd-f5b02ec1cd44050f.rmeta -Dwarnings -Winvalid_codeblock_attributes` (exit code: 1)

command did not execute successfully: "/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustdoc" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "8" "--release" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/home/joshua/rustc/library/test/Cargo.toml" "-p" "proc_macro" "--" "--markdown-css" "rust.css" "--markdown-no-toc" "-Z" "unstable-options" "--resource-suffix" "1.47.0" "--index-page" "/home/joshua/rustc/src/doc/"
expected success, got: exit code: 101

failed to run: /home/joshua/rustc/build/bootstrap/debug/bootstrap doc --stage 1 library/proc_macro/ --on-fail=print-env
nagisa (Aug 09 2020 at 11:22, on Zulip):

it only affects rustc invocations, implementation of on-fail is in the rustc wrapper that executes.

nagisa (Aug 09 2020 at 11:24, on Zulip):

additionally that documentation seems wrong, the on-fail accepts a command to run, so you want env the command...

Joshua Nelson (Aug 09 2020 at 12:48, on Zulip): also uses a fake rustdoc so it seems like it should have worked here

Joshua Nelson (Aug 09 2020 at 12:49, on Zulip):

I just want a way to run gdb on rustdoc :( do you know how to do that? How would you run gdb on rustc?

teor (Aug 09 2020 at 12:51, on Zulip):

Sounds like you need RUSTC_WRAPPER, but for rustdoc, and in an interactive terminal.

Joshua Nelson (Aug 09 2020 at 12:57, on Zulip):

That sounds like it might work

Joshua Nelson (Aug 09 2020 at 12:57, on Zulip):

Is RUSTDOC_WRAPPER a thing? Rustdoc seems to be forgotten a lot.

simulacrum (Aug 09 2020 at 13:20, on Zulip):

rustdoc wrapper probably just doesn't have the on fail handling

Joshua Nelson (Aug 09 2020 at 13:25, on Zulip):

Last update: Sep 27 2020 at 13:45UTC