Conversation
|
Some changes occurred in intra-doc-links. cc @jyn514 |
|
r? @ollie27 (rust-highfive has picked a reviewer for you, use r? to override) |
|
r? @jyn514 |
src/librustdoc/clean/cfg.rs
Outdated
There was a problem hiding this comment.
Can you match on this in Cfg::Not directly instead of having two nested matches?
There was a problem hiding this comment.
Cfg::Not contains a Box<Cfg>, I'm not sure how to match on that.
There was a problem hiding this comment.
interesting, thanks :D
src/librustdoc/clean/cfg.rs
Outdated
There was a problem hiding this comment.
Unnecessary deref of self. Can that guard be turned into a direct match like Cfg::Cfg(sym::target_feature, _))?
There was a problem hiding this comment.
@LingMan no, target_feature is a constant, not an enum variant.
There was a problem hiding this comment.
@jyn514 Why would that be a problem?
fn should_use_with_in_description(&self) -> bool {
matches!(self , Cfg::Cfg(sym::target_feature, _))
}
passes ./x.py check just fine. Is there a semantic difference I'm not aware of?
There was a problem hiding this comment.
I didn't know that was a valid pattern 👀 I found that it works even if there's no path in front, but I could have sworn that meant a variable binding instead ... I'm really confused 😕
There was a problem hiding this comment.
It becomes a variable binding if you remove the use inner::C;.
src/librustdoc/clean/types.rs
Outdated
There was a problem hiding this comment.
Those _, _ could be replaced by ...
Unnecessary deref. Same for other instances below.
a3a44e4 to
4d9a6b0
Compare
fixes clippy warnings of type: match_like_matches_macro or_fun_call op_ref needless_return let_and_return single_char_add_str useless_format unnecessary_sort_by match_ref_pats redundant_field_names
4d9a6b0 to
a5807ac
Compare
|
@bors delegate=LingMan |
|
✌️ @LingMan can now approve this pull request |
|
@bors r+ rollup |
|
📌 Commit a5807ac has been approved by |
Rollup of 6 pull requests Successful merges: - rust-lang#80546 (clippy fixes for librustdoc) - rust-lang#80555 (Improve library tracking issue template) - rust-lang#80574 (Clean bootstrap artifacts on `x.py clean`) - rust-lang#80578 (improve unconditional_panic description) - rust-lang#80599 (`const_generics_defaults`: don't ICE in the unimplemented parts) - rust-lang#80613 (Diag: print enum variant instead of enum type) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
fixes clippy warnings of type:
match_like_matches_macro
or_fun_call
op_ref
needless_return
let_and_return
single_char_add_str
useless_format
unnecessary_sort_by
match_ref_pats
redundant_field_names