Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/mir/eval.rs')
-rw-r--r--crates/hir-ty/src/mir/eval.rs14
1 files changed, 5 insertions, 9 deletions
diff --git a/crates/hir-ty/src/mir/eval.rs b/crates/hir-ty/src/mir/eval.rs
index dfcfa209c5..386226b16d 100644
--- a/crates/hir-ty/src/mir/eval.rs
+++ b/crates/hir-ty/src/mir/eval.rs
@@ -658,20 +658,18 @@ impl Evaluator<'_> {
cached_fn_trait_func: db
.lang_item(crate_id, LangItem::Fn)
.and_then(|x| x.as_trait())
- .and_then(|x| {
- db.trait_items(x).method_by_name(&Name::new_symbol_root(sym::call.clone()))
- }),
+ .and_then(|x| db.trait_items(x).method_by_name(&Name::new_symbol_root(sym::call))),
cached_fn_mut_trait_func: db
.lang_item(crate_id, LangItem::FnMut)
.and_then(|x| x.as_trait())
.and_then(|x| {
- db.trait_items(x).method_by_name(&Name::new_symbol_root(sym::call_mut.clone()))
+ db.trait_items(x).method_by_name(&Name::new_symbol_root(sym::call_mut))
}),
cached_fn_once_trait_func: db
.lang_item(crate_id, LangItem::FnOnce)
.and_then(|x| x.as_trait())
.and_then(|x| {
- db.trait_items(x).method_by_name(&Name::new_symbol_root(sym::call_once.clone()))
+ db.trait_items(x).method_by_name(&Name::new_symbol_root(sym::call_once))
}),
})
}
@@ -2814,9 +2812,7 @@ impl Evaluator<'_> {
) -> Result<()> {
let Some(drop_fn) = (|| {
let drop_trait = self.db.lang_item(self.crate_id, LangItem::Drop)?.as_trait()?;
- self.db
- .trait_items(drop_trait)
- .method_by_name(&Name::new_symbol_root(sym::drop.clone()))
+ self.db.trait_items(drop_trait).method_by_name(&Name::new_symbol_root(sym::drop))
})() else {
// in some tests we don't have drop trait in minicore, and
// we can ignore drop in them.
@@ -2926,7 +2922,7 @@ pub fn render_const_using_debug_impl(
not_supported!("core::fmt::Debug not found");
};
let Some(debug_fmt_fn) =
- db.trait_items(debug_trait).method_by_name(&Name::new_symbol_root(sym::fmt.clone()))
+ db.trait_items(debug_trait).method_by_name(&Name::new_symbol_root(sym::fmt))
else {
not_supported!("core::fmt::Debug::fmt not found");
};