mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Use statics + clone instead of const until const can access statics
This commit is contained in:
parent
dd626e78c7
commit
f2d51073d2
49 changed files with 389 additions and 362 deletions
|
@ -650,7 +650,7 @@ impl InferenceContext<'_> {
|
|||
if let Some(deref_fn) = self
|
||||
.db
|
||||
.trait_data(deref_trait)
|
||||
.method_by_name(&Name::new_symbol_root(sym::deref))
|
||||
.method_by_name(&Name::new_symbol_root(sym::deref.clone()))
|
||||
{
|
||||
// FIXME: this is wrong in multiple ways, subst is empty, and we emit it even for builtin deref (note that
|
||||
// the mutability is not wrong, and will be fixed in `self.infer_mut`).
|
||||
|
@ -791,7 +791,7 @@ impl InferenceContext<'_> {
|
|||
if let Some(func) = self
|
||||
.db
|
||||
.trait_data(index_trait)
|
||||
.method_by_name(&Name::new_symbol_root(sym::index))
|
||||
.method_by_name(&Name::new_symbol_root(sym::index.clone()))
|
||||
{
|
||||
let substs = TyBuilder::subst_for_def(self.db, index_trait, None)
|
||||
.push(self_ty.clone())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue