bazelbuild / bazelbuild/rules_rust
rustfmt incompatible with `unused-qualifications`
- Dominant language
- Starlark
- Stars
- 843
- Forks
- 651
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 15
Description
Our repository has `-Dunused-qualifications` in the build flags, and now we can't run rustfmt anymore (well, without some workarounds) because we get lots of errors like the following when running `bazel run @rules_rust//:rustfmt`:
```
error: unnecessary qualification
--> external/rules_rust+/rust/runfiles/runfiles.rs:158:49
|
158 | let mode = if let Some(manifest_file) = std::env::var_os(MANIFEST_FILE_ENV_VAR) {
| ^^^^^^^^^^^^^^^^
|
= note: requested on the command line with `-D unused-qualifications`
help: remove the unnecessary path segments
|
158 - let mode = if let Some(manifest_file) = std::env::var_os(MANIFEST_FILE_ENV_VAR) {
158 + let mode = if let Some(manifest_file) = env::var_os(MANIFEST_FILE_ENV_VAR) {
|
```
Contributor guide
Assessment
This issue has not been assessed yet.