use rustc_data_structures::sync::Lrc;
use rustc_errors::{ColorConfig, ErrorReported};
use rustc_hir as hir;
-use rustc_hir::intravisit;
use rustc_hir::def_id::LOCAL_CRATE;
+use rustc_hir::intravisit;
use rustc_hir::{HirId, CRATE_HIR_ID};
use rustc_interface::interface;
use rustc_middle::hir::map::Map;
use rustc_span::edition::Edition;
use rustc_span::source_map::SourceMap;
use rustc_span::symbol::sym;
+use rustc_span::Symbol;
use rustc_span::{BytePos, FileName, Pos, Span, DUMMY_SP};
use rustc_target::spec::TargetTriple;
use tempfile::Builder as TempFileBuilder;
let res = interface::run_compiler(config, |compiler| {
compiler.enter(|queries| {
- let _lower_to_hir = queries.lower_to_hir()?;
let mut global_ctxt = queries.global_ctxt()?.take();
let collector = global_ctxt.enter(|tcx| {
opts.display_warnings |= options.display_warnings;
let enable_per_target_ignores = options.enable_per_target_ignores;
let mut collector = Collector::new(
- tcx.crate_name(LOCAL_CRATE).to_string(),
+ tcx.crate_name(LOCAL_CRATE),
options,
false,
opts,
options: Options,
use_headers: bool,
enable_per_target_ignores: bool,
- crate_name: String,
+ crate_name: Symbol,
opts: TestOptions,
position: Span,
source_map: Option<Lrc<SourceMap>>,
impl Collector {
crate fn new(
- crate_name: String,
+ crate_name: Symbol,
options: Options,
use_headers: bool,
opts: TestOptions,
// compiler failures are test failures
should_panic: testing::ShouldPanic::No,
allow_fail: config.allow_fail,
- #[cfg(not(bootstrap))]
compile_fail: config.compile_fail,
- #[cfg(not(bootstrap))]
no_run,
test_type: testing::TestType::DocTest,
},