Delay parsing of --cfg
and --check-cfg
options.
By storing the unparsed values in `Config` and then parsing them within `run_compiler`, the parsing functions can use the main symbol interner, and not create their own short-lived interners. This change also eliminates the need for one `EarlyErrorHandler` in rustdoc, because parsing errors can be reported by another, slightly later `EarlyErrorHandler`.
This commit is contained in:
parent
ec2b311914
commit
678e01a3fc
5 changed files with 271 additions and 289 deletions
|
@ -757,8 +757,7 @@ fn main_args(
|
|||
(false, true) => {
|
||||
let input = options.input.clone();
|
||||
let edition = options.edition;
|
||||
let config =
|
||||
core::create_config(handler, options, &render_options, using_internal_features);
|
||||
let config = core::create_config(options, &render_options, using_internal_features);
|
||||
|
||||
// `markdown::render` can invoke `doctest::make_test`, which
|
||||
// requires session globals and a thread pool, so we use
|
||||
|
@ -791,7 +790,7 @@ fn main_args(
|
|||
let scrape_examples_options = options.scrape_examples_options.clone();
|
||||
let bin_crate = options.bin_crate;
|
||||
|
||||
let config = core::create_config(handler, options, &render_options, using_internal_features);
|
||||
let config = core::create_config(options, &render_options, using_internal_features);
|
||||
|
||||
interface::run_compiler(config, |compiler| {
|
||||
let sess = compiler.session();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue