diff options
| author | bors <bors@rust-lang.org> | 2020-05-26 10:42:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-05-26 10:42:41 +0000 |
| commit | aeca4d6428c52cbf2c8d1f28657b0bdf92e4ea7c (patch) | |
| tree | 6b1d7c34dfcacaf6702bd8d043c566f0f536c065 /src/librustdoc/test.rs | |
| parent | cb272d5d21c94f9a460d68d76817227a5913fbf7 (diff) | |
| parent | c8fb0d7ef38957cd2b8f6e5b9b7ea47eaa6cca28 (diff) | |
Auto merge of #71900 - GuillaumeGomez:clean-up-rustdoc, r=ollie27,kinnison
Clean up rustdoc source code Fixes #70498. r? @kinnison cc @rust-lang/rustdoc
Diffstat (limited to 'src/librustdoc/test.rs')
| -rw-r--r-- | src/librustdoc/test.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs index a00c9a0bcea..284e6d421ee 100644 --- a/src/librustdoc/test.rs +++ b/src/librustdoc/test.rs @@ -43,7 +43,7 @@ pub struct TestOptions { pub attrs: Vec<String>, } -pub fn run(options: Options) -> i32 { +pub fn run(options: Options) -> Result<(), String> { let input = config::Input::File(options.input.clone()); let invalid_codeblock_attribute_name = rustc_lint::builtin::INVALID_CODEBLOCK_ATTRIBUTE.name; @@ -151,7 +151,7 @@ pub fn run(options: Options) -> i32 { }); let tests = match tests { Ok(tests) => tests, - Err(ErrorReported) => return 1, + Err(ErrorReported) => return Err(String::new()), }; test_args.insert(0, "rustdoctest".to_string()); @@ -162,7 +162,7 @@ pub fn run(options: Options) -> i32 { Some(testing::Options::new().display_output(display_warnings)), ); - 0 + Ok(()) } // Look for `#![doc(test(no_crate_inject))]`, used by crates in the std facade. |
