mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Auto merge of #16749 - Veykril:on-demand-validation-err, r=Veykril
internal: Some method resolution cleanups
This commit is contained in:
commit
a5035f4931
10 changed files with 154 additions and 150 deletions
|
@ -4037,7 +4037,7 @@ impl Type {
|
|||
|
||||
let canonical_ty =
|
||||
Canonical { value: self.ty.clone(), binders: CanonicalVarKinds::empty(Interner) };
|
||||
method_resolution::implements_trait(&canonical_ty, db, self.env.clone(), trait_)
|
||||
method_resolution::implements_trait(&canonical_ty, db, &self.env, trait_)
|
||||
}
|
||||
|
||||
/// Checks that particular type `ty` implements `std::ops::FnOnce`.
|
||||
|
@ -4052,12 +4052,7 @@ impl Type {
|
|||
|
||||
let canonical_ty =
|
||||
Canonical { value: self.ty.clone(), binders: CanonicalVarKinds::empty(Interner) };
|
||||
method_resolution::implements_trait_unique(
|
||||
&canonical_ty,
|
||||
db,
|
||||
self.env.clone(),
|
||||
fnonce_trait,
|
||||
)
|
||||
method_resolution::implements_trait_unique(&canonical_ty, db, &self.env, fnonce_trait)
|
||||
}
|
||||
|
||||
// FIXME: Find better API that also handles const generics
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue