mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +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(
|
err.multipart_suggestion_verbose(
|
||||||
msg,
|
msg,
|
||||||
sugg.clone(),
|
sugg,
|
||||||
Applicability::MaybeIncorrect,
|
Applicability::MaybeIncorrect,
|
||||||
);
|
);
|
||||||
for error in errors {
|
for error in errors {
|
||||||
|
@ -30,7 +30,7 @@ impl<'tcx> IntoKind for Const<'tcx> {
|
|||||||
type Kind = ConstKind<'tcx>;
|
type Kind = ConstKind<'tcx>;
|
||||||
|
|
||||||
fn kind(self) -> ConstKind<'tcx> {
|
fn kind(self) -> ConstKind<'tcx> {
|
||||||
self.kind().clone()
|
self.kind()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1002,7 +1002,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||||||
UNUSED_IMPORTS,
|
UNUSED_IMPORTS,
|
||||||
id,
|
id,
|
||||||
import.span,
|
import.span,
|
||||||
msg.to_string(),
|
msg,
|
||||||
BuiltinLintDiagnostics::RedundantImportVisibility {
|
BuiltinLintDiagnostics::RedundantImportVisibility {
|
||||||
max_vis: max_vis.to_string(def_id, self.tcx),
|
max_vis: max_vis.to_string(def_id, self.tcx),
|
||||||
span: import.span,
|
span: import.span,
|
||||||
|
@ -11,7 +11,7 @@ pub struct MachineInfo {
|
|||||||
|
|
||||||
impl MachineInfo {
|
impl MachineInfo {
|
||||||
pub fn target() -> MachineInfo {
|
pub fn target() -> MachineInfo {
|
||||||
with(|cx| cx.target_info().clone())
|
with(|cx| cx.target_info())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn target_endianess() -> Endian {
|
pub fn target_endianess() -> Endian {
|
||||||
|
Loading…
Reference in New Issue
Block a user