提交 3bad9f7b 编写于 作者: E Eduard-Mihai Burtescu

rustc: implement fmt::{Debug,Display} on Ty instead of TyS.

上级 01fa283d
......@@ -1124,7 +1124,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
}
define_print! {
('tcx) ty::TyS<'tcx>, (self, f, cx) {
('tcx) ty::Ty<'tcx>, (self, f, cx) {
display {
match self.sty {
Bool => write!(f, "bool"),
......
......@@ -141,7 +141,7 @@ fn write_graph_label<'a, 'gcx, 'tcx, W: Write>(tcx: TyCtxt<'a, 'gcx, 'tcx>,
)?;
}
write!(w, ") -&gt; {}", escape(mir.return_ty()))?;
write!(w, ") -&gt; {}", escape(&mir.return_ty()))?;
write!(w, r#"<br align="left"/>"#)?;
for local in mir.vars_and_temps_iter() {
......
......@@ -134,7 +134,7 @@ fn visit_ty(&mut self, ty: Ty<'tcx>) -> bool {
ty::FnDef(def_id, ..) |
ty::Closure(def_id, ..) |
ty::Generator(def_id, ..) => {
if self.def_id_visitor.visit_def_id(def_id, "type", ty) {
if self.def_id_visitor.visit_def_id(def_id, "type", &ty) {
return true;
}
if self.def_id_visitor.shallow() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册