Auto merge of #125294 - matthiaskrgr:rollup-w42c829, r=matthiaskrgr
Rollup of 4 pull requests Successful merges: - #124948 (chore: Remove repeated words (extension of #124924)) - #124992 (Add example to IsTerminal::is_terminal) - #125279 (make `Debug` impl for `Term` simpler) - #125286 (Miri subtree update) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
d84b903754
93 changed files with 1403 additions and 681 deletions
|
@ -536,14 +536,10 @@ unsafe impl<'tcx> Sync for Term<'tcx> where &'tcx (Ty<'tcx>, Const<'tcx>): Sync
|
|||
|
||||
impl Debug for Term<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
let data = if let Some(ty) = self.ty() {
|
||||
format!("Term::Ty({ty:?})")
|
||||
} else if let Some(ct) = self.ct() {
|
||||
format!("Term::Ct({ct:?})")
|
||||
} else {
|
||||
unreachable!()
|
||||
};
|
||||
f.write_str(&data)
|
||||
match self.unpack() {
|
||||
TermKind::Ty(ty) => write!(f, "Term::Ty({ty:?})"),
|
||||
TermKind::Const(ct) => write!(f, "Term::Const({ct:?})"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue