fix clippy::{clone_on_copy, useless_conversion}
This commit is contained in:
parent
d666f6bf22
commit
bcd79c222a
3 changed files with 4 additions and 5 deletions
|
@ -528,7 +528,7 @@ impl<'cx, 'tcx> BorrowckInferCtxt<'cx, 'tcx> {
|
||||||
where
|
where
|
||||||
F: Fn() -> RegionCtxt,
|
F: Fn() -> RegionCtxt,
|
||||||
{
|
{
|
||||||
let next_region = self.infcx.next_nll_region_var(origin.clone());
|
let next_region = self.infcx.next_nll_region_var(origin);
|
||||||
let vid = next_region.as_var();
|
let vid = next_region.as_var();
|
||||||
|
|
||||||
if cfg!(debug_assertions) && !self.inside_canonicalization_ctxt() {
|
if cfg!(debug_assertions) && !self.inside_canonicalization_ctxt() {
|
||||||
|
|
|
@ -645,9 +645,8 @@ pub(super) fn implied_predicates_with_filter(
|
||||||
};
|
};
|
||||||
|
|
||||||
// Combine the two lists to form the complete set of superbounds:
|
// Combine the two lists to form the complete set of superbounds:
|
||||||
let implied_bounds = &*tcx
|
let implied_bounds =
|
||||||
.arena
|
&*tcx.arena.alloc_from_iter(superbounds.predicates().chain(where_bounds_that_match));
|
||||||
.alloc_from_iter(superbounds.predicates().into_iter().chain(where_bounds_that_match));
|
|
||||||
debug!(?implied_bounds);
|
debug!(?implied_bounds);
|
||||||
|
|
||||||
// Now require that immediate supertraits are converted,
|
// Now require that immediate supertraits are converted,
|
||||||
|
|
|
@ -231,7 +231,7 @@ pub(crate) fn alloc_self_profile_query_strings_for_query_cache<'tcx, C>(
|
||||||
// locked while doing so. Instead we copy out the
|
// locked while doing so. Instead we copy out the
|
||||||
// `(query_key, dep_node_index)` pairs and release the lock again.
|
// `(query_key, dep_node_index)` pairs and release the lock again.
|
||||||
let mut query_keys_and_indices = Vec::new();
|
let mut query_keys_and_indices = Vec::new();
|
||||||
query_cache.iter(&mut |k, _, i| query_keys_and_indices.push((k.clone(), i)));
|
query_cache.iter(&mut |k, _, i| query_keys_and_indices.push((*k, i)));
|
||||||
|
|
||||||
// Now actually allocate the strings. If allocating the strings
|
// Now actually allocate the strings. If allocating the strings
|
||||||
// generates new entries in the query cache, we'll miss them but
|
// generates new entries in the query cache, we'll miss them but
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue