[−][src]Module rustc_middle::ty::print::pretty

Structs

FmtPrinter
FmtPrinterData
RegionHighlightMode

The "region highlights" are used to control region printing during specific error messages. When a "region highlight" is enabled, it gives an alternate way to print specific regions. For now, we always print those regions using a number, so something like "'0".

TraitRefPrintOnlyTraitPath

Wrapper type for ty::TraitRef which opts-in to pretty printing only the trait path. That is, it will print Trait<U> instead of <T as Trait<U>>.

Constants

FORCE_IMPL_FILENAME_LINE
NO_QUERIES
SHOULD_PREFIX_WITH_CRATE

Traits

PrettyPrinter

Trait for printers that pretty-print using fmt::Write to the printer.

Functions

guess_def_namespace
with_crate_prefix

Adds the crate:: prefix to paths where appropriate.

with_forced_impl_filename_line

Force us to name impls with just the filename/line number. We normally try to use types. But at some points, notably while printing cycle errors, this can result in extra or suboptimal error output, so this variable disables that check.

with_no_queries

Avoids running any queries during any prints that occur during the closure. This may alter the appearance of some types (e.g. forcing verbose printing for opaque types). This method is used during some queries (e.g. predicates_of for opaque types), to ensure that any debug printing that occurs during the query computation does not end up recursively calling the same query.