-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
A-attributesProposals relating to attributesProposals relating to attributesA-debuggingDebugging related proposals & ideasDebugging related proposals & ideasA-envEnvironment variable related proposals & ideasEnvironment variable related proposals & ideasT-compilerRelevant to the compiler team, which will review and decide on the RFC.Relevant to the compiler team, which will review and decide on the RFC.T-langRelevant to the language team, which will review and decide on the RFC.Relevant to the language team, which will review and decide on the RFC.
Description
It would be nice if we could rename the RUST_BACKTRACE
environment variable to something custom like MYCRATE_BACKTRACE
. This idea came to me from looking at env_logger
and how you can rename the environment variable it uses via from_env
.
I suggest something along the lines of this:
#![backtrace_env = "MYCRATE_BACKTRACE"]
fn main() {
// ...
}
And then enabling it via:
MYCRATE_BACKTRACE=1 ./mycrate
Supporting reasons:
- Gives some sense of consistency for end users who may not know what Rust is, where the current variable name may be confusing
- Some authors believe the end user has no business knowing what language their program was written in
- Backtraces may be enabled for some Rust programs but not all when executed in the same environment, such as in a shell script
mqudsi, fstirlitz, ArniDagur, Xymist and aloucks
Metadata
Metadata
Assignees
Labels
A-attributesProposals relating to attributesProposals relating to attributesA-debuggingDebugging related proposals & ideasDebugging related proposals & ideasA-envEnvironment variable related proposals & ideasEnvironment variable related proposals & ideasT-compilerRelevant to the compiler team, which will review and decide on the RFC.Relevant to the compiler team, which will review and decide on the RFC.T-langRelevant to the language team, which will review and decide on the RFC.Relevant to the language team, which will review and decide on the RFC.