// A generic trait to abstract the rewriting of an element (of the AST).
-use syntax::codemap::{CodeMap, Span};
use syntax::parse::ParseSess;
+use syntax::source_map::{SourceMap, Span};
use config::{Config, IndentStyle};
use shape::Shape;
#[derive(Clone)]
pub struct RewriteContext<'a> {
pub parse_session: &'a ParseSess,
- pub codemap: &'a CodeMap,
+ pub source_map: &'a SourceMap,
pub config: &'a Config,
pub inside_macro: RefCell<bool>,
// Force block indent style even if we are using visual indent style.
// When rewriting chain, veto going multi line except the last element
pub force_one_line_chain: RefCell<bool>,
pub snippet_provider: &'a SnippetProvider<'a>,
- pub report: FormatReport,
+ // Used for `format_snippet`
+ pub(crate) macro_rewrite_failure: RefCell<bool>,
+ pub(crate) report: FormatReport,
}
impl<'a> RewriteContext<'a> {