Skip to content

Commit 5da99de

Browse files
committed
clone less
1 parent 4911224 commit 5da99de

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
880880
(pair, r)
881881
})
882882
.unzip();
883-
self.record_late_bound_vars(hir_id, binders.clone());
883+
self.record_late_bound_vars(hir_id, binders);
884884
// Even if there are no lifetimes defined here, we still wrap it in a binder
885885
// scope. If there happens to be a nested poly trait ref (an error), that
886886
// will be `Concatenating` anyways, so we don't have to worry about the depth

compiler/rustc_mir_build/src/build/matches/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
856856
}
857857

858858
PatKind::InlineConstant { ref subpattern, .. } => {
859-
self.visit_primary_bindings(subpattern, pattern_user_ty.clone(), f)
859+
self.visit_primary_bindings(subpattern, pattern_user_ty, f)
860860
}
861861

862862
PatKind::Leaf { ref subpatterns } => {

src/bootstrap/src/core/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1410,7 +1410,7 @@ impl<'a> Builder<'a> {
14101410
}
14111411

14121412
// #[cfg(bootstrap)]
1413-
let use_new_check_cfg_syntax = self.local_rebuild;
1413+
let use_new_check_cfg_syntax = self.local_rebuild || cmd == "clippy";
14141414

14151415
// Enable compile-time checking of `cfg` names, values and Cargo `features`.
14161416
//

src/librustdoc/html/markdown.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1750,7 +1750,7 @@ pub(crate) fn markdown_links<'md, R>(
17501750
}
17511751
// do not actually include braces in the span
17521752
let range = (open_brace + 1)..close_brace;
1753-
MarkdownLinkRange::Destination(range.clone())
1753+
MarkdownLinkRange::Destination(range)
17541754
};
17551755

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

17921792
let mut broken_link_callback = |link: BrokenLink<'md>| Some((link.reference, "".into()));

src/librustdoc/passes/lint/html_tags.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub(crate) fn visit_item(cx: &DocContext<'_>, item: &Item) {
2929
crate::lint::INVALID_HTML_TAGS,
3030
hir_id,
3131
sp,
32-
msg.to_string(),
32+
msg,
3333
|lint| {
3434
use rustc_lint_defs::Applicability;
3535
// If a tag looks like `<this>`, it might actually be a generic.

0 commit comments

Comments
 (0)