Struct rustc_symbol_mangling::legacy::SymbolPrinter[][src]

struct SymbolPrinter<'tcx> {
    tcx: TyCtxt<'tcx>,
    path: SymbolPath,
    keep_within_component: bool,
}

Fields

tcx: TyCtxt<'tcx>path: SymbolPathkeep_within_component: bool

Trait Implementations

Returns true if the region should be printed in optional positions, e.g., &'a T or dyn Tr + 'b. This is typically the case for all non-'_ regions. Read more

Prints comma-separated elements.

Prints <...> around what f prints.

Like print_def_path but for value paths.

Prints {f: t} or {f as t} depending on the cast argument

If possible, this returns a global path resolving to def_id that is visible from at least one local module, and returns true. If the crate defining def_id is declared with an extern crate, the path is guaranteed to use the extern crate. Read more

Try to see if this path can be trimmed to a unique symbol name.

Does the work of try_print_visible_def_path, building the full definition path recursively before attempting to post-process it into the valid and visible version that accounts for re-exports. Read more

This is overridden for MIR printing because we only want to hide alloc ids from users, not from MIR where it is actually useful. Read more

Writes a string slice into this writer, returning whether the write succeeded. Read more

Writes a char into this writer, returning whether the write succeeded. Read more

Glue for usage of the write! macro with implementors of this trait. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Layout

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 64 bytes