Currently, bootstrap uses assert! interchangeably between "we expect this command to always succeed" and "you, the user, did something wrong and need to fix it". See
|
assert!(out.status.success(), "`cargo miri setup` returned with non-0 exit code"); |
for an example of the former and
|
assert!(llvm_bin_path.is_dir()); |
for an example of the latter. We should have more helpful error reporting for the latter, to make it more clear that it's not a bug.
The background motivation is that people are used to seeing the latter panics, and so don't report bugs when they see the former. This makes it hard to fix bugs because we don't know things are broken.
Currently, bootstrap uses
assert!interchangeably between "we expect this command to always succeed" and "you, the user, did something wrong and need to fix it". Seerust/src/bootstrap/test.rs
Line 553 in d28ef9d
rust/src/bootstrap/test.rs
Line 1611 in d28ef9d
The background motivation is that people are used to seeing the latter panics, and so don't report bugs when they see the former. This makes it hard to fix bugs because we don't know things are broken.