mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
8136: Introduce QuantifiedWhereClause and DynTy analogous to Chalk r=flodiebold a=flodiebold
This introduces a bunch of new binders in lots of places, which we have to be careful about, but we had to add them at some point. There's a lot of skipping of the binders; once we're done with the Chalk move, we should review the remaining ones.
8146: Document patch policy r=matklad a=matklad
bors r+
🤖
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
6f1f91cdcf
11 changed files with 215 additions and 113 deletions
|
@ -11,6 +11,7 @@ use hir_def::{
|
|||
AssocContainerId, FieldId, Lookup,
|
||||
};
|
||||
use hir_expand::name::{name, Name};
|
||||
use stdx::always;
|
||||
use syntax::ast::RangeOp;
|
||||
|
||||
use crate::{
|
||||
|
@ -936,7 +937,9 @@ impl<'a> InferenceContext<'a> {
|
|||
let def: CallableDefId = from_chalk(self.db, *fn_def);
|
||||
let generic_predicates = self.db.generic_predicates(def.into());
|
||||
for predicate in generic_predicates.iter() {
|
||||
let predicate = predicate.clone().subst(parameters);
|
||||
let (predicate, binders) =
|
||||
predicate.clone().subst(parameters).into_value_and_skipped_binders();
|
||||
always!(binders == 0); // quantified where clauses not yet handled
|
||||
self.obligations.push(predicate.cast(&Interner));
|
||||
}
|
||||
// add obligation for trait implementation, if this is a trait method
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue