[−][src]Module rustc_mir::util::pretty

Structs

ExtraComments

Enums

PassWhere

An indication of where we are in the control flow graph. Used for printing extra information in dump_mir

Constants

ALIGN

Alignment for lining up comments following MIR statements

BYTES_PER_LINE

Number of bytes to print per allocation hex dump line.

INDENT

Functions

comment
create_dump_file

Attempts to open a file where we should dump a given MIR or other bit of MIR-related data. Used by mir-dump, but also by other bits of code (e.g., NLL inference) that dump graphviz data or other things, and hence takes the extension as an argument.

create_dump_file_with_basename

Attempts to open the MIR dump file with the given name and extension.

display_allocation

Dumps the size and metadata and content of an allocation to the given writer. The expectation is that the caller first prints other relevant metadata, so the exact format of this function is (without leading or trailing newline):

dump_enabled
dump_file_basename

Returns the file basename portion (without extension) of a filename path where we should dump a MIR representation output files.

dump_matched_mir_node
dump_mir

If the session is properly configured, dumps a human-readable representation of the mir into:

dump_mir_def_ids
dump_path

Returns the path to the filename where we should dump a given MIR. Also used by other bits of code (e.g., NLL inference) that dump graphviz data or other things.

write_allocation_bytes

The prefix argument allows callers to add an arbitrary prefix before each line (even if there is only one line). Note that your prefix should contain a trailing space as the lines are printed directly after it.

write_allocation_endline
write_allocation_newline

Prints the line start address and returns the new line start address.

write_allocations

Find all AllocIds mentioned (recursively) in the MIR body and print their corresponding allocations.

write_basic_block

Write out a human-readable textual representation for the given basic block.

write_extra

After we print the main statement, we sometimes dump extra information. There's often a lot of little things "nuzzled up" in a statement.

write_mir_fn

Write out a human-readable textual representation for the given function.

write_mir_intro

Write out a human-readable textual representation of the MIR's fn type and the types of its local variables (both user-defined bindings and compiler temporaries).

write_mir_pretty

Write out a human-readable textual representation for the given MIR.

write_mir_sig
write_scope_tree

Prints local variables in a scope tree.

write_user_type_annotations