-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bootstrap: clean up a few clippy findings #55391
Conversation
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
@bors r+ rollup |
📌 Commit 54edf32 has been approved by |
…li-obk bootstrap: clean up a few clippy findings remove useless format!()s remove redundant field names in a few struct initializations pass slice instead of a vector to a function use is_empty() instead of comparisons to .len() No functional change intended.
src/bootstrap/lib.rs
Outdated
@@ -783,7 +783,7 @@ impl Build { | |||
fn cflags(&self, target: Interned<String>, which: GitRepo) -> Vec<String> { | |||
// Filter out -O and /O (the optimization flags) that we picked up from | |||
// cc-rs because the build scripts will determine that for themselves. | |||
let mut base = self.cc[&target].args().iter() | |||
let mut base: Vec<String> = self.cc[&target].args().iter() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have this in the collect annotation? It's also not clear to me exactly what's changing here, so maybe it's not worth it? (to clarify this is a non-blocking request so fine to merge without)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, this change was not really necessary but I wondered what the .into()
was referring to (into what..) and that would have made it clear (into String
) so I added it to make the code a bit clearer.
Since base
is returned and the return type is Vec<String>
the type is recognized from there perhaps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, changed.
54edf32
to
b77de26
Compare
Rollup of 21 pull requests Successful merges: - #54816 (Don't try to promote already promoted out temporaries) - #54824 (Cleanup rustdoc tests with `@!has` and `@!matches`) - #54921 (Add line numbers option to rustdoc) - #55167 (Add a "cheap" mode for `compute_missing_ctors`.) - #55258 (Fix Rustdoc ICE when checking blanket impls) - #55264 (Compile the libstd we distribute with -Ccodegen-unit=1) - #55271 (Unimplement ExactSizeIterator for MIR traversing iterators) - #55292 (Macro diagnostics tweaks) - #55298 (Point at macro definition when no rules expect token) - #55301 (List allowed tokens after macro fragments) - #55302 (Extend the impl_stable_hash_for! macro for miri.) - #55325 (Fix link to macros chapter) - #55343 (rustbuild: fix remap-debuginfo when building a release) - #55346 (Shrink `Statement`.) - #55358 (Remove redundant clone (2)) - #55370 (Update mailmap for estebank) - #55375 (Typo fixes in configure_cmake comments) - #55378 (rustbuild: use configured linker to build boostrap) - #55379 (validity: assert that unions are non-empty) - #55383 (Use `SmallVec` for the queue in `coerce_unsized`.) - #55391 (bootstrap: clean up a few clippy findings)
@bors r+ |
📌 Commit b77de260b01d062a59564f97a2cd52df23e09997 has been approved by |
b77de26
to
9a9320e
Compare
Looks like the PR was added to rollup after I pushed the minor change. |
You can remove the type annotation on the variable now |
9a9320e
to
32d07cc
Compare
@bors r+ rollup |
📌 Commit 32d07cc has been approved by |
…imNN bootstrap: clean up a few clippy findings remove useless format!()s remove redundant field names in a few struct initializations pass slice instead of a vector to a function use is_empty() instead of comparisons to .len() No functional change intended.
…imNN bootstrap: clean up a few clippy findings remove useless format!()s remove redundant field names in a few struct initializations pass slice instead of a vector to a function use is_empty() instead of comparisons to .len() No functional change intended.
Rollup of 22 pull requests Successful merges: - #55391 (bootstrap: clean up a few clippy findings) - #56021 (avoid features_untracked) - #56023 (atomic::Ordering: Get rid of misleading parts of intro) - #56080 (Reduce the amount of bold text at doc.rlo) - #56114 (Enclose type in backticks for "non-exhaustive patterns" error) - #56124 (Fix small doc mistake on std::io::read::read_to_end) - #56127 (Update an outdated comment in mir building) - #56148 (Add rustc-guide as a submodule) - #56149 (Make std::os::unix/linux::fs::MetadataExt::a/m/ctime* documentation clearer) - #56220 (Suggest appropriate place for lifetime when declared after type arguments) - #56223 (Make JSON output from -Zprofile-json valid) - #56236 (Remove unsafe `unsafe` inner function.) - #56255 (Update outdated code comments in StringReader) - #56257 (rustc-guide has moved to rust-lang/) - #56273 (Add missing doc link) - #56289 (Fix small typo in comment of thread::stack_size) - #56294 (Fix a typo in the documentation of std::ffi) - #56312 (Deduplicate literal -> constant lowering) - #56319 (fix futures creating aliasing mutable and shared ref) - #56321 (rustdoc: add bottom margin spacing to nested lists) - #56322 (resolve: Fix false-positives from lint `absolute_paths_not_starting_with_crate`) - #56330 (Clean up span in non-trailing `..` suggestion) Failed merges: r? @ghost
remove useless format!()s
remove redundant field names in a few struct initializations
pass slice instead of a vector to a function
use is_empty() instead of comparisons to .len()
No functional change intended.