Module rustc_middle::ty::print::pretty
source ยท Macrosยง
- define_helper ๐
- define_print ๐
- define_scoped_cx ๐
- p ๐
- Adds the
crate::prefix to paths where appropriate. - 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.
- Avoids running any queries during prints.
- Prevent path trimming if it is turned on. Path trimming affects
Displayimpl of various rustc types, for examplestd::vec::Vecwould be trimmed toVec, if no otherVecis found. - Prevent selection of visible paths.
Displayimpl of DefId will prefer visible (public) reexports of types as paths. - Avoids running select 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.
explicit_item_boundsfor opaque types), to ensure that any debug printing that occurs during the query computation does not end up recursively calling the same query.
Structsยง
- RegionFolder ๐Folds through bound vars and placeholders, naming them
- 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โ. - Wrapper type for
ty::TraitRefwhich opts-in to pretty printing only the trait name. That is, it will printTraitinstead of<T as Trait<U>>. - Wrapper type for
ty::TraitRefwhich opts-in to pretty printing only the trait path. That is, it will printTrait<U>instead of<T as Trait<U>>. - Wrapper type for
ty::TraitRefwhich opts-in to pretty printing only the trait path, and additionally tries to โsugarโFn(...)trait bounds.
Constantsยง
- FORCE_TRIMMED_PATH ๐
- NO_TRIMMED_PATH ๐
- NO_VISIBLE_PATH ๐
- REDUCED_QUERIES ๐
Traitsยง
- Trait for printers that pretty-print using
fmt::Writeto the printer.
Functionsยง
- for_each_def ๐
- guess_def_namespace ๐
- pretty_print_const ๐
- The purpose of this function is to collect public symbols names that are unique across all crates in the build. Later, when printing about types we can use those names instead of the full exported path to them.