Add term
Instead of having a separate enum variant for types and consts have one but have either a const or type.
This commit is contained in:
parent
0765999622
commit
fb57b7518d
11 changed files with 68 additions and 37 deletions
|
@ -997,12 +997,10 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
|||
};
|
||||
|
||||
let kind = match constraint.kind {
|
||||
AssocConstraintKind::Equality { ref ty } => {
|
||||
hir::TypeBindingKind::Equality { ty: self.lower_ty(ty, itctx) }
|
||||
}
|
||||
AssocConstraintKind::ConstEquality { ref c } => {
|
||||
hir::TypeBindingKind::Const { c: self.lower_anon_const(c) }
|
||||
}
|
||||
AssocConstraintKind::Equality { ref term } => match term {
|
||||
Term::Ty(ref ty) => hir::TypeBindingKind::Equality { ty: self.lower_ty(ty, itctx) },
|
||||
Term::Const(ref c) => hir::TypeBindingKind::Const { c: self.lower_anon_const(c) },
|
||||
},
|
||||
AssocConstraintKind::Bound { ref bounds } => {
|
||||
let mut capturable_lifetimes;
|
||||
let mut parent_def_id = self.current_hir_id_owner;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue