move config.rs to libsyntax_expand
This commit is contained in:
parent
5011ec7fed
commit
be023ebe85
31 changed files with 259 additions and 175 deletions
|
@ -3,6 +3,7 @@ use syntax::parse::lexer::{StringReader as Lexer};
|
|||
use syntax::token;
|
||||
use syntax::sess::ParseSess;
|
||||
use syntax::source_map::FilePathMapping;
|
||||
use syntax_expand::config::process_configure_mod;
|
||||
use syntax_pos::{InnerSpan, FileName};
|
||||
|
||||
use crate::clean;
|
||||
|
@ -27,7 +28,7 @@ struct SyntaxChecker<'a, 'tcx> {
|
|||
|
||||
impl<'a, 'tcx> SyntaxChecker<'a, 'tcx> {
|
||||
fn check_rust_syntax(&self, item: &clean::Item, dox: &str, code_block: RustCodeBlock) {
|
||||
let sess = ParseSess::new(FilePathMapping::empty());
|
||||
let sess = ParseSess::new(FilePathMapping::empty(), process_configure_mod);
|
||||
let source_file = sess.source_map().new_source_file(
|
||||
FileName::Custom(String::from("doctest")),
|
||||
dox[code_block.code].to_owned(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue