[][src]Module c2rust_refactor::ast_manip::util

Miscellaneous utility functions.

Traits

PatternSymbol

Extract the symbol from a pattern-like AST.

Functions

extended_span

Extend a node span to cover its attributes. (By default, item spans cover only the item body, not the preceding attrs.)

is_relative_path

Is a path relative to the current module?

join_visibility

Select the wider of the two given visibilities

macro_name

Get the name of a macro invocation.

namespace

Return the namespace the given Def is defined in. Does not yet handle the macro namespace.

split_uses

Split a use statement which may have nesting into one or more simple use statements without nesting.

use_idents

Retrieve the list of Idents defined by the given UseTree

with_span_text

Get the text of a span, and pass it to a callback. Returns false if the span text isn't available.