Skip to content

Commit fd68560

Browse files
committed
Add Ref to TypeName
1 parent 220953b commit fd68560

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

chalk-ir/src/debug.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ impl<I: Interner> Debug for TypeName<I> {
145145
TypeName::Tuple(arity) => write!(fmt, "{:?}", arity),
146146
TypeName::OpaqueType(opaque_ty) => write!(fmt, "!{:?}", opaque_ty),
147147
TypeName::Raw(mutability) => write!(fmt, "{:?}", mutability),
148+
TypeName::Ref(mutability) => write!(fmt, "{:?}", mutability),
148149
TypeName::Error => write!(fmt, "{{error}}"),
149150
}
150151
}

chalk-ir/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ pub enum TypeName<I: Interner> {
159159
/// a raw pointer type like `*const T` or `*mut T`
160160
Raw(Mutability),
161161

162+
/// a reference type like `&T` or `&mut T`
163+
Ref(Mutability),
164+
162165
/// a placeholder for opaque types like `impl Trait`
163166
OpaqueType(OpaqueTyId<I>),
164167

chalk-solve/src/clauses.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ fn match_type_name<I: Interner>(
411411
builder.push_fact(WellFormed::Ty(application.clone().intern(interner)))
412412
}
413413
TypeName::Raw(_) => builder.push_fact(WellFormed::Ty(application.clone().intern(interner))),
414+
TypeName::Ref(_) => builder.push_fact(WellFormed::Ty(application.clone().intern(interner))),
414415
}
415416
}
416417

0 commit comments

Comments
 (0)