mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
Rollup merge of #118840 - matthiaskrgr:cloooooone, r=compiler-errors
remove some redundant clones
This commit is contained in:
commit
fefa8fc6c4
@ -1204,7 +1204,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
||||
};
|
||||
err.multipart_suggestion_verbose(
|
||||
msg,
|
||||
sugg.clone(),
|
||||
sugg,
|
||||
Applicability::MaybeIncorrect,
|
||||
);
|
||||
for error in errors {
|
||||
|
@ -30,7 +30,7 @@ impl<'tcx> IntoKind for Const<'tcx> {
|
||||
type Kind = ConstKind<'tcx>;
|
||||
|
||||
fn kind(self) -> ConstKind<'tcx> {
|
||||
self.kind().clone()
|
||||
self.kind()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1002,7 +1002,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
||||
UNUSED_IMPORTS,
|
||||
id,
|
||||
import.span,
|
||||
msg.to_string(),
|
||||
msg,
|
||||
BuiltinLintDiagnostics::RedundantImportVisibility {
|
||||
max_vis: max_vis.to_string(def_id, self.tcx),
|
||||
span: import.span,
|
||||
|
@ -11,7 +11,7 @@ pub struct MachineInfo {
|
||||
|
||||
impl MachineInfo {
|
||||
pub fn target() -> MachineInfo {
|
||||
with(|cx| cx.target_info().clone())
|
||||
with(|cx| cx.target_info())
|
||||
}
|
||||
|
||||
pub fn target_endianess() -> Endian {
|
||||
|
Loading…
Reference in New Issue
Block a user