diff options
author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-03-02 23:05:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-02 23:05:29 +0100 |
commit | 13640e337a34b15167b889bf50711d1145e64805 (patch) | |
tree | ded8c8a0afef83b23c5b72011cd1d4a4ddf6f77c /tests/rustdoc-js-std/parser-errors.js | |
parent | 564715a5b7fa43dbdca96b49d0086ac7a2d76b58 (diff) | |
parent | 2407b0c5787e731f9ed39ad180d87de166fa54bf (diff) | |
download | rust-13640e337a34b15167b889bf50711d1145e64805.tar.gz |
Rollup merge of #108573 - kornelski:runtimeenvs, r=WaffleLapkin
Explain compile-time vs run-time difference in env!() error message
This PR is clarifying error message of `env!()` based on this user question: https://users.rust-lang.org/t/environment-variable-out-dir-is-undefined/90067
It makes it clear that `env!()` is for env variables defined at compile-time. There's special-case help text for common Cargo build script variables.
I've also rearranged the code to avoid allocating error message on the happy path when the env var is defined.
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions