Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/mir/eval/shim.rs')
-rw-r--r--crates/hir-ty/src/mir/eval/shim.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir-ty/src/mir/eval/shim.rs b/crates/hir-ty/src/mir/eval/shim.rs
index 67e102b1ed..6818759310 100644
--- a/crates/hir-ty/src/mir/eval/shim.rs
+++ b/crates/hir-ty/src/mir/eval/shim.rs
@@ -319,7 +319,7 @@ impl Evaluator<'_> {
return Some(LangItem::BeginPanic);
}
- let candidate = attrs.by_key("lang").string_value().and_then(LangItem::from_str)?;
+ let candidate = attrs.lang_item()?;
// We want to execute these functions with special logic
// `PanicFmt` is not detected here as it's redirected later.
if [BeginPanic, SliceLen, DropInPlace].contains(&candidate) {
@@ -1279,7 +1279,7 @@ impl Evaluator<'_> {
if let Some(def) = target.as_trait().and_then(|it| {
self.db
.trait_data(it)
- .method_by_name(&Name::new_symbol_root(sym::call_once))
+ .method_by_name(&Name::new_symbol_root(sym::call_once.clone()))
}) {
self.exec_fn_trait(
def,