about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc/ty/print/mod.rs8
-rw-r--r--src/librustc/ty/structural_impls.rs2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/librustc/ty/print/mod.rs b/src/librustc/ty/print/mod.rs
index 99b83deab8b..ef30a4032d8 100644
--- a/src/librustc/ty/print/mod.rs
+++ b/src/librustc/ty/print/mod.rs
@@ -16,6 +16,14 @@ pub trait Print<'gcx, 'tcx, P> {
     fn print(&self, cx: P) -> Result<Self::Output, Self::Error>;
 }
 
+/// Interface for outputting user-facing "type-system entities"
+/// (paths, types, lifetimes, constants, etc.) as a side-effect
+/// (e.g. formatting, like `PrettyPrinter` implementors do) or by
+/// constructing some alternative representation (e.g. an AST),
+/// which the associated types allow passing through the methods.
+///
+/// For pretty-printing/formatting in particular, see `PrettyPrinter`.
+// FIXME(eddyb) find a better name, this is more general than "printing".
 pub trait Printer<'gcx: 'tcx, 'tcx>: Sized {
     type Error;
 
diff --git a/src/librustc/ty/structural_impls.rs b/src/librustc/ty/structural_impls.rs
index 6aabdf1e566..ecfb034e4f2 100644
--- a/src/librustc/ty/structural_impls.rs
+++ b/src/librustc/ty/structural_impls.rs
@@ -225,7 +225,7 @@ impl fmt::Debug for ty::FloatVarValue {
 
 impl fmt::Debug for ty::TraitRef<'tcx> {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        // HACK(eddyb) this is used across the compiler to print
+        // FIXME(#59188) this is used across the compiler to print
         // a `TraitRef` qualified (with the Self type explicit),
         // instead of having a different way to make that choice.
         write!(f, "<{} as {}>", self.self_ty(), self)