about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-01-06 23:15:17 +0100
committerGitHub <noreply@github.com>2022-01-06 23:15:17 +0100
commit844a657bb85dfea37c7fb0a01c927c38fc586b40 (patch)
tree678d51db9d95918dcefd12757f91298f66ad3432 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent1a8f69826c75a65acb018a183610e4b1cb32c46d (diff)
parent7174ec22cfc05d7e75678a1362ccfcf89b351b71 (diff)
downloadrust-844a657bb85dfea37c7fb0a01c927c38fc586b40.tar.gz
rust-844a657bb85dfea37c7fb0a01c927c38fc586b40.zip
Rollup merge of #92504 - dtolnay:wall, r=jackh726
Exit nonzero on rustc -Wall

Previously `rustc -Wall /dev/null` would print a paragraph explaining that `-Wall` is not a thing in Rust, but would then exit 0. I believe exiting 0 is not the right behavior. For something like `rustc --version` or `rustc --help` or `rustc -C help` the user is requesting rustc to print some information; rustc prints that information and exits 0 because what the user requested has been accomplished. In the case of `rustc -Wall path/to/main.rs`, I don't find it correct to conceptualize this as "the user requested rustc to print information about the fact that Wall doesn't exist". The user requested a particular thing, and despite rustc knowing what they probably meant and informing them about that, the thing they requested has *not* been accomplished. Thus a nonzero exit code is needed.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions