diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2024-05-27 23:53:46 +0200 |
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2024-05-30 22:52:33 +0200 |
| commit | a2c6f80a45f84c20ec839e7842214938df5c6f71 (patch) | |
| tree | fb62ca5846ac6b7ec5dd06e5f4dae8cf3011282f | |
| parent | 97bdbd96f17c1dbff17331c96e1ac1fbdf4bb405 (diff) | |
| download | rust-a2c6f80a45f84c20ec839e7842214938df5c6f71.tar.gz rust-a2c6f80a45f84c20ec839e7842214938df5c6f71.zip | |
Rename HIR `TypeBinding` to `AssocItemConstraint` and related cleanup
| -rw-r--r-- | src/types.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/types.rs b/src/types.rs index 75dea90d994..7d14d9e727a 100644 --- a/src/types.rs +++ b/src/types.rs @@ -140,7 +140,7 @@ pub(crate) enum SegmentParam<'a> { Const(&'a ast::AnonConst), LifeTime(&'a ast::Lifetime), Type(&'a ast::Ty), - Binding(&'a ast::AssocConstraint), + Binding(&'a ast::AssocItemConstraint), } impl<'a> SegmentParam<'a> { @@ -175,9 +175,9 @@ impl<'a> Rewrite for SegmentParam<'a> { } } -impl Rewrite for ast::AssocConstraint { +impl Rewrite for ast::AssocItemConstraint { fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String> { - use ast::AssocConstraintKind::{Bound, Equality}; + use ast::AssocItemConstraintKind::{Bound, Equality}; let mut result = String::with_capacity(128); result.push_str(rewrite_ident(context, self.ident)); @@ -205,14 +205,14 @@ impl Rewrite for ast::AssocConstraint { } } -impl Rewrite for ast::AssocConstraintKind { +impl Rewrite for ast::AssocItemConstraintKind { fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String> { match self { - ast::AssocConstraintKind::Equality { term } => match term { + ast::AssocItemConstraintKind::Equality { term } => match term { Term::Ty(ty) => ty.rewrite(context, shape), Term::Const(c) => c.rewrite(context, shape), }, - ast::AssocConstraintKind::Bound { bounds } => bounds.rewrite(context, shape), + ast::AssocItemConstraintKind::Bound { bounds } => bounds.rewrite(context, shape), } } } |
