Matthias Krüger 13640e337a
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.
2023-03-02 23:05:29 +01:00
..
2023-02-28 15:59:47 +01:00
2023-02-22 21:52:26 +00:00
2023-02-22 21:52:26 +00:00
2023-02-19 03:46:03 +00:00
2023-02-16 11:42:35 -03:00
2023-02-22 21:52:26 +00:00
2023-02-16 11:42:35 -03:00
2023-03-01 13:26:59 +01:00
2023-02-07 19:17:24 +00:00
2023-02-25 16:27:10 +00:00
2023-02-16 11:42:35 -03:00
2023-02-20 15:28:59 +00:00
2023-03-01 13:28:12 +00:00
2023-02-05 15:29:07 +01:00
2023-02-16 15:06:17 -08:00
2023-02-12 20:18:48 -05:00
2023-02-26 10:30:27 +00:00
2023-02-21 05:21:07 +00:00
2023-02-07 19:17:24 +00:00
2023-02-22 21:52:26 +00:00
2023-02-21 05:21:07 +00:00
2023-02-09 10:26:49 +00:00