]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/doctest.rs
Auto merge of #86520 - ssomers:btree_iterators_checked_unwrap, r=Mark-Simulacrum
[rust.git] / src / librustdoc / doctest.rs
index d791a995d863eb1f86f121d22435a0f13c985ac6..1281f76fd0fdc9d42739251f8799cf8ef54d87a9 100644 (file)
@@ -3,8 +3,8 @@
 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;
@@ -14,6 +14,7 @@
 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,
@@ -796,7 +796,7 @@ fn register_header(&mut self, _name: &str, _level: u32) {}
     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>>,
@@ -808,7 +808,7 @@ fn register_header(&mut self, _name: &str, _level: u32) {}
 
 impl Collector {
     crate fn new(
-        crate_name: String,
+        crate_name: Symbol,
         options: Options,
         use_headers: bool,
         opts: TestOptions,
@@ -941,9 +941,7 @@ fn add_test(&mut self, test: String, config: LangString, line: usize) {
                 // 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,
             },