Skip to content

Commit

Permalink
clone less
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Nov 3, 2023
1 parent 4911224 commit 5da99de
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
(pair, r)
})
.unzip();
self.record_late_bound_vars(hir_id, binders.clone());
self.record_late_bound_vars(hir_id, binders);
// Even if there are no lifetimes defined here, we still wrap it in a binder
// scope. If there happens to be a nested poly trait ref (an error), that
// will be `Concatenating` anyways, so we don't have to worry about the depth
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_mir_build/src/build/matches/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
}

PatKind::InlineConstant { ref subpattern, .. } => {
self.visit_primary_bindings(subpattern, pattern_user_ty.clone(), f)
self.visit_primary_bindings(subpattern, pattern_user_ty, f)
}

PatKind::Leaf { ref subpatterns } => {
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,7 @@ impl<'a> Builder<'a> {
}

// #[cfg(bootstrap)]
let use_new_check_cfg_syntax = self.local_rebuild;
let use_new_check_cfg_syntax = self.local_rebuild || cmd == "clippy";

// Enable compile-time checking of `cfg` names, values and Cargo `features`.
//
Expand Down
4 changes: 2 additions & 2 deletions src/librustdoc/html/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,7 @@ pub(crate) fn markdown_links<'md, R>(
}
// do not actually include braces in the span
let range = (open_brace + 1)..close_brace;
MarkdownLinkRange::Destination(range.clone())
MarkdownLinkRange::Destination(range)
};

let span_for_offset_forward = |span: Range<usize>, open: u8, close: u8| {
Expand Down Expand Up @@ -1786,7 +1786,7 @@ pub(crate) fn markdown_links<'md, R>(
}
// do not actually include braces in the span
let range = (open_brace + 1)..close_brace;
MarkdownLinkRange::Destination(range.clone())
MarkdownLinkRange::Destination(range)
};

let mut broken_link_callback = |link: BrokenLink<'md>| Some((link.reference, "".into()));
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/passes/lint/html_tags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub(crate) fn visit_item(cx: &DocContext<'_>, item: &Item) {
crate::lint::INVALID_HTML_TAGS,
hir_id,
sp,
msg.to_string(),
msg,
|lint| {
use rustc_lint_defs::Applicability;
// If a tag looks like `<this>`, it might actually be a generic.
Expand Down

0 comments on commit 5da99de

Please sign in to comment.