[−][src]Module c2rust_refactor::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.
format!
. The expansion offormat!("...", x)
copies the span of the expressionx
to a number of other nodes, such as&x
, the__arg0
pattern used to matchx
, and the reference tostd::fmt::Display::fmt
used to formatx
. We'd like to detect all of these bogus spans and reset them.
Functions
fix_attr_spans | |
fix_format |