diff --git a/.travis.yml b/.travis.yml index abf565453de..966b7d7bac4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,6 +49,7 @@ script: if [ -z ${INTEGRATION} ]; then cargo build cargo test + cargo test -- --ignored else ./ci/integration.sh fi diff --git a/appveyor.yml b/appveyor.yml index 87c1773ce8e..1d3b06152a9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -50,3 +50,4 @@ build: false test_script: - cargo build --verbose - cargo test + - cargo test -- --ignored diff --git a/src/chains.rs b/src/chains.rs index 1ca0ac582b7..c7acf19ee0c 100644 --- a/src/chains.rs +++ b/src/chains.rs @@ -16,7 +16,7 @@ //! following values of `chain_indent`: //! Block: //! -//! ```ignore +//! ```text //! let foo = { //! aaaa; //! bbb; @@ -27,7 +27,7 @@ //! //! Visual: //! -//! ```ignore +//! ```text //! let foo = { //! aaaa; //! bbb; @@ -41,7 +41,7 @@ //! the braces. //! Block: //! -//! ```ignore +//! ```text //! let a = foo.bar //! .baz() //! .qux @@ -49,7 +49,7 @@ //! //! Visual: //! -//! ```ignore +//! ```text //! let a = foo.bar //! .baz() //! .qux @@ -454,7 +454,7 @@ trait ChainFormatter { // Parent is the first item in the chain, e.g., `foo` in `foo.bar.baz()`. // Root is the parent plus any other chain items placed on the first line to // avoid an orphan. E.g., - // ```ignore + // ```text // foo.bar // .baz() // ``` @@ -516,7 +516,7 @@ impl<'a> ChainFormatterShared<'a> { // know whether 'overflowing' the last child make a better formatting: // // A chain with overflowing the last child: - // ```ignore + // ```text // parent.child1.child2.last_child( // a, // b, @@ -525,7 +525,7 @@ impl<'a> ChainFormatterShared<'a> { // ``` // // A chain without overflowing the last child (in vertical layout): - // ```ignore + // ```text // parent // .child1 // .child2 @@ -534,7 +534,7 @@ impl<'a> ChainFormatterShared<'a> { // // In particular, overflowing is effective when the last child is a method with a multi-lined // block-like argument (e.g., closure): - // ```ignore + // ```text // parent.child1.child2.last_child(|a, b, c| { // let x = foo(a, b, c); // let y = bar(a, b, c); diff --git a/src/config/license.rs b/src/config/license.rs index 2eb23bbcec7..121a1b1c151 100644 --- a/src/config/license.rs +++ b/src/config/license.rs @@ -82,7 +82,7 @@ impl TemplateParser { /// /// # Examples /// - /// ```ignore + /// ```text /// assert_eq!( /// TemplateParser::parse( /// r" diff --git a/src/macros.rs b/src/macros.rs index ac00e4452a7..c42010f77b2 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -1417,7 +1417,7 @@ impl MacroBranch { /// /// # Expected syntax /// -/// ```ignore +/// ```text /// lazy_static! { /// [pub] static ref NAME_1: TYPE_1 = EXPR_1; /// [pub] static ref NAME_2: TYPE_2 = EXPR_2; diff --git a/src/utils.rs b/src/utils.rs index 26ee7317df5..1a4941aa72e 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -507,7 +507,7 @@ pub(crate) fn remove_trailing_white_spaces(text: &str) -> String { /// Indent each line according to the specified `indent`. /// e.g. /// -/// ```rust,ignore +/// ```rust,compile_fail /// foo!{ /// x, /// y, @@ -521,7 +521,7 @@ pub(crate) fn remove_trailing_white_spaces(text: &str) -> String { /// /// will become /// -/// ```rust,ignore +/// ```rust,compile_fail /// foo!{ /// x, /// y, diff --git a/tests/cargo-fmt/main.rs b/tests/cargo-fmt/main.rs index d1ba2e689b6..5493b09e4aa 100644 --- a/tests/cargo-fmt/main.rs +++ b/tests/cargo-fmt/main.rs @@ -46,6 +46,7 @@ macro_rules! assert_that { }; } +#[ignore] #[test] fn version() { assert_that!(&["--version"], starts_with("rustfmt ")); @@ -54,6 +55,7 @@ fn version() { assert_that!(&["--", "--version"], starts_with("rustfmt ")); } +#[ignore] #[test] fn print_config() { assert_that!( @@ -62,6 +64,7 @@ fn print_config() { ); } +#[ignore] #[test] fn rustfmt_help() { assert_that!(&["--", "--help"], contains("Format Rust code")); diff --git a/tests/rustfmt/main.rs b/tests/rustfmt/main.rs index 51f311cd08d..18ef9b60963 100644 --- a/tests/rustfmt/main.rs +++ b/tests/rustfmt/main.rs @@ -48,6 +48,7 @@ macro_rules! assert_that { }; } +#[ignore] #[test] fn print_config() { assert_that!( diff --git a/tests/source/issue-3055/original.rs b/tests/source/issue-3055/original.rs index ad505547ac0..45e58473a4a 100644 --- a/tests/source/issue-3055/original.rs +++ b/tests/source/issue-3055/original.rs @@ -17,7 +17,7 @@ /// ``` /// /// Should not format with ignore attribute -/// ```ignore +/// ```text /// .--------------. /// | v /// Park <- Idle -> Poll -> Probe -> Download -> Install -> Reboot diff --git a/tests/target/issue-3055/original.rs b/tests/target/issue-3055/original.rs index de27ccfb344..2df6adbb5e2 100644 --- a/tests/target/issue-3055/original.rs +++ b/tests/target/issue-3055/original.rs @@ -18,7 +18,7 @@ /// ``` /// /// Should not format with ignore attribute -/// ```ignore +/// ```text /// .--------------. /// | v /// Park <- Idle -> Poll -> Probe -> Download -> Install -> Reboot