diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs index f661b2a38b655..496cc4e8b26fa 100644 --- a/src/librustc_driver/driver.rs +++ b/src/librustc_driver/driver.rs @@ -193,7 +193,7 @@ pub fn compile_input(sess: &Session, (control.after_analysis.callback)(state); if control.after_analysis.stop == Compilation::Stop { - return Err(0usize); + return result.and_then(|_| Err(0usize)); } } diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index bef6c1ed43aa6..4a4bcd96ad06c 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -632,7 +632,7 @@ recursion limit (which can be set via the `recursion_limit` attribute). For a somewhat artificial example: -```compile_fail +```compile_fail,ignore #![recursion_limit="2"] struct Foo; diff --git a/src/test/rustdoc/no-run-still-checks-lints.rs b/src/test/rustdoc/no-run-still-checks-lints.rs new file mode 100644 index 0000000000000..a9df3c3c7f265 --- /dev/null +++ b/src/test/rustdoc/no-run-still-checks-lints.rs @@ -0,0 +1,19 @@ +// Copyright 2016 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// compile-flags:--test +// should-fail + +#![doc(test(attr(deny(warnings))))] + +/// ```no_run +/// let a = 3; +/// ``` +pub fn foo() {}