about summary refs log tree commit diff
path: root/src/librustdoc
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2019-07-01 16:41:37 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2019-07-01 16:41:37 +0200
commita683bb175468354a4ebec51667fec8c3d467240f (patch)
tree5afe2f6f3065cab01a7a1b9e65dba25bddaf85f5 /src/librustdoc
parent765eebf064ae17347f3532791760fc5c2150b5ea (diff)
downloadrust-a683bb175468354a4ebec51667fec8c3d467240f.tar.gz
rust-a683bb175468354a4ebec51667fec8c3d467240f.zip
Revert "implicit `Option`-returning doctests"
This reverts commit 6bb6c001be34d0932a014df981ee18f165c43374.
Diffstat (limited to 'src/librustdoc')
-rw-r--r--src/librustdoc/test.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs
index 7b90561bdad..63545ab45bf 100644
--- a/src/librustdoc/test.rs
+++ b/src/librustdoc/test.rs
@@ -528,13 +528,8 @@ pub fn make_test(s: &str,
         prog.push_str(everything_else);
     } else {
         let returns_result = everything_else.trim_end().ends_with("(())");
-        let returns_option = everything_else.trim_end().ends_with("Some(())");
         let (main_pre, main_post) = if returns_result {
-            (if returns_option {
-                "fn main() { fn _inner() -> Option<()> {"
-            } else {
-                "fn main() { fn _inner() -> Result<(), impl core::fmt::Debug> {"
-            },
+            ("fn main() { fn _inner() -> Result<(), impl core::fmt::Debug> {",
              "}\n_inner().unwrap() }")
         } else {
             ("fn main() {\n", "\n}")