Skip to content

Commit 1c4fe64

Browse files
committed
Continue work on assoc const eq
1 parent 21b4a9c commit 1c4fe64

File tree

6 files changed

+471
-152
lines changed

6 files changed

+471
-152
lines changed

compiler/rustc_middle/src/ty/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,9 @@ impl<'tcx> Term<'tcx> {
857857
pub fn ty(&self) -> Option<Ty<'tcx>> {
858858
if let Term::Ty(ty) = self { Some(ty) } else { None }
859859
}
860+
pub fn ct(&self) -> Option<&'tcx Const<'tcx>> {
861+
if let Term::Const(c) = self { Some(c) } else { None }
862+
}
860863
}
861864

862865
/// This kind of predicate has no *direct* correspondent in the

0 commit comments

Comments
 (0)