diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-03-14 19:47:24 +0200 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-03-15 13:25:10 +0200 |
| commit | 0ee059d5a08662b22250e28dbd5d5a9502303afb (patch) | |
| tree | fbabdb62e0fc72267674007c1b24454b5aca7570 | |
| parent | 4653ae1e3e9ce3613844987b43431b35302fb34a (diff) | |
| download | rust-0ee059d5a08662b22250e28dbd5d5a9502303afb.tar.gz rust-0ee059d5a08662b22250e28dbd5d5a9502303afb.zip | |
Fix rebase fallout and address some review comments.
| -rw-r--r-- | src/librustc/ty/print/mod.rs | 8 | ||||
| -rw-r--r-- | src/librustc/ty/structural_impls.rs | 2 |
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) |
