]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/markdown.rs
Rollup merge of #91529 - TennyZhuang:try_reserve_binary_heap, r=yaahc
[rust.git] / src / librustdoc / markdown.rs
index 47b24d40edc27ccaac299bfe59f804cd9ca4675d..906b8f8a245709656d2e657c573de12397913eba 100644 (file)
@@ -7,7 +7,7 @@
 use rustc_span::Symbol;
 
 use crate::config::{Options, RenderOptions};
-use crate::doctest::{Collector, TestOptions};
+use crate::doctest::{Collector, GlobalTestOptions};
 use crate::html::escape::Escape;
 use crate::html::markdown;
 use crate::html::markdown::{
@@ -129,9 +129,8 @@ fn extract_leading_metadata(s: &str) -> (Vec<&str>, &str) {
 crate fn test(options: Options) -> Result<(), String> {
     let input_str = read_to_string(&options.input)
         .map_err(|err| format!("{}: {}", options.input.display(), err))?;
-    let mut opts = TestOptions::default();
+    let mut opts = GlobalTestOptions::default();
     opts.no_crate_inject = true;
-    opts.display_doctest_warnings = options.display_doctest_warnings;
     let mut collector = Collector::new(
         Symbol::intern(&options.input.display().to_string()),
         options.clone(),
@@ -146,11 +145,6 @@ fn extract_leading_metadata(s: &str) -> (Vec<&str>, &str) {
 
     find_testable_code(&input_str, &mut collector, codes, options.enable_per_target_ignores, None);
 
-    crate::doctest::run_tests(
-        options.test_args,
-        options.nocapture,
-        options.display_doctest_warnings,
-        collector.tests,
-    );
+    crate::doctest::run_tests(options.test_args, options.nocapture, collector.tests);
     Ok(())
 }