Rollup merge of #69495 - matthiaskrgr:op_ref, r=oli-obk
don't take redundant references to operands
This commit is contained in:
commit
b19e822b9b
@ -1050,7 +1050,7 @@ fn new(needle: &[u8], end: usize) -> TwoWaySearcher {
|
||||
// &v[..period]. If it is, we use "Algorithm CP1". Otherwise we use
|
||||
// "Algorithm CP2", which is optimized for when the period of the needle
|
||||
// is large.
|
||||
if &needle[..crit_pos] == &needle[period..period + crit_pos] {
|
||||
if needle[..crit_pos] == needle[period..period + crit_pos] {
|
||||
// short period case -- the period is exact
|
||||
// compute a separate critical factorization for the reversed needle
|
||||
// x = u' v' where |v'| < period(x).
|
||||
|
@ -341,7 +341,7 @@ pub fn note_and_explain_type_err(
|
||||
db.note("distinct uses of `impl Trait` result in different opaque types");
|
||||
let e_str = values.expected.to_string();
|
||||
let f_str = values.found.to_string();
|
||||
if &e_str == &f_str && &e_str == "impl std::future::Future" {
|
||||
if e_str == f_str && &e_str == "impl std::future::Future" {
|
||||
// FIXME: use non-string based check.
|
||||
db.help(
|
||||
"if both `Future`s have the same `Output` type, consider \
|
||||
|
@ -745,7 +745,7 @@ fn highlight_outer(
|
||||
.join(", ");
|
||||
if !lifetimes.is_empty() {
|
||||
if sub.regions().count() < len {
|
||||
value.push_normal(lifetimes + &", ");
|
||||
value.push_normal(lifetimes + ", ");
|
||||
} else {
|
||||
value.push_normal(lifetimes);
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
|
||||
.filter_map(|lint| {
|
||||
// We don't want to whitelist *all* lints so let's
|
||||
// ignore those ones.
|
||||
if whitelisted_lints.iter().any(|l| &lint.name == l) {
|
||||
if whitelisted_lints.iter().any(|l| lint.name == l) {
|
||||
None
|
||||
} else {
|
||||
Some((lint::LintId::of(lint), lint::Allow))
|
||||
|
Loading…
Reference in New Issue
Block a user