[][src]Crate c2rust_refactor

Modules

analysis

Analysis passes used to drive various transformations.

ast_manip

General-purpose AST manipulation utilities. Everything in here works strictly on the AST, with no reliance on HIR or TyCtxt information.

collapse

Macro collapsing - the opposite of macro expansion.

command

Command management and overall refactoring state.

contains_mark

Helper for checking if a node or one of its descendants has a particular mark.

driver

Frontend logic for parsing and expanding ASTs. This code largely mimics the behavior of rustc_driver::driver::compile_input.

file_io
illtyped
interact

Interactive mode, for running c2rust-refactor as a backend for editor plugins.

mark_adjust

This module implements commands for manipulating the current set of marked nodes.

matcher

AST pattern matching implementation.

node_map

Mappings between old and new NodeIds. Also has some support for AttrIds.

path_edit

fold_resolved_paths function, for rewriting paths based on their resolved DefId.

pick_node

Helper functions for picking a node by source location.

plugin

Simple plugin loading infrastructure.

print_spans

Debug command for printing the span of every major AST node.

reflect

Functions for building AST representations of higher-level values.

resolve
rewrite

Module for rewriting source text to reflect changes in the AST.

select

A simple scripting language for marking a set of nodes.

span_fix

This module contains some AST folds for fixing up span information. There are a few sources of bogus spans, which cause major confusion during rewriting.

transform

AST transformation implementations. Most c2rust-refactor commands are transforms implemented in the submodules of this module.

type_map

Helper definitions for constructing a mapping between ast::Tys and some higher-level representation (usually ty::Ty or LabeledTy).

util

Miscellaneous utility functions.

Macros

expect
match_or
matches
unpack

Structs

Command
Cursor
Mark
Options
RefactorCtxt

Driver context. Contains all available analysis results as of the current compiler phase.

Enums

RustcArgSource

Functions

lib_main