-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Avoid ICE if environment variable is not set #31248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Looks good, but probably best to at least spit a warning rather than silently failing to emit metadata. Usually, crates with |
Fixed, please take another look. |
I would go further and emit an error, rather than a warning - not emitting metadata is pretty bad |
Done. This now makes rustdoc fail with an error when I run |
Rustdoc could trigger a code path that relied on the $CFG_COMPILER_HOST_TRIPLE environment variable being set, causing an ICE if it was not. This fixes that, emitting an error instead of crashing.
@bors: r+ |
📌 Commit a7f1d12 has been approved by |
This fixes #31238. r? @michaelsproul
@ruud-v-a: To make your use case work you can always manually export the environment variable. I don't think the value is even significant as it's just used for naming, e.g. use "linux" instead of "x86_64-gnu-linux-unknown" (or whatever) |
This fixes #31238.
r? @michaelsproul