Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests failing in git master branch on consecutive "cargo test"s #2595

Closed
matthiaskrgr opened this issue Mar 30, 2018 · 9 comments
Closed

tests failing in git master branch on consecutive "cargo test"s #2595

matthiaskrgr opened this issue Mar 30, 2018 · 9 comments
Labels
C-bug Category: Clippy is not doing the correct thing

Comments

@matthiaskrgr
Copy link
Member

meta:

git repo @ b7a0b97e97e1aa9e7ce2377ae623cbbdaf78372c
rustc 1.26.0-nightly (ae544ee1c 2018-03-29)

I was trying to do some changes to clippy but the testsuit already failed without me doing anything :(
some failures:

test [ui] ui/regex.rs ... FAILED
test [ui] ui/serde.rs ... FAILED
test [ui] ui/useless_attribute.rs ... FAILED
failures:
---- [ui] ui/regex.rs stdout ----
    normalized stderr:
error[E0464]: multiple matching crates for `regex`
 --> $DIR/regex.rs:7:1
  |
7 | extern crate regex;
  | ^^^^^^^^^^^^^^^^^^^
  |
  = note: candidates:
          crate `regex`: /home/matthias/rust-clippy/target/debug/deps/libregex-675feed4e989e2c7.rlib
error[E0514]: found crate `regex` compiled by an incompatible version of rustc
 --> $DIR/regex.rs:7:1
  |
7 | extern crate regex;
  | ^^^^^^^^^^^^^^^^^^^
  |
  = help: please recompile that crate using this compiler (rustc 1.26.0-nightly (ae544ee1c 2018-03-29))
  = note: the following crate versions were found:
          crate `regex` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libregex_syntax-545ef797e48b20ad.rlib
          crate `regex` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libregex-4ccd5a559b909c15.rlib
error: aborting due to 2 previous errors
Some errors occurred: E0464, E0514.
For more information about an error, try `rustc --explain E0464`.
expected stderr:
error: trivial regex
  --> $DIR/regex.rs:16:45
   |
16 |     let pipe_in_wrong_position = Regex::new("|");
   |                                             ^^^
   |
   = note: `-D trivial-regex` implied by `-D warnings`
   = help: the regex is unlikely to be useful as it is
error: trivial regex
  --> $DIR/regex.rs:17:60
   |
17 |     let pipe_in_wrong_position_builder = RegexBuilder::new("|");
   |                                                            ^^^
   |
   = help: the regex is unlikely to be useful as it is
error: regex syntax error: invalid character class range, the start must be <= the end
  --> $DIR/regex.rs:18:42
   |
18 |     let wrong_char_ranice = Regex::new("[z-a]");
   |                                          ^^^
   |
   = note: `-D invalid-regex` implied by `-D warnings`
error: regex syntax error: invalid character class range, the start must be <= the end
  --> $DIR/regex.rs:19:37
   |
19 |     let some_unicode = Regex::new("[é-è]");
   |                                     ^^^
error: regex syntax error on position 0: unclosed group
  --> $DIR/regex.rs:21:33
   |
21 |     let some_regex = Regex::new(OPENING_PAREN);
   |                                 ^^^^^^^^^^^^^
error: trivial regex
  --> $DIR/regex.rs:23:53
   |
23 |     let binary_pipe_in_wrong_position = BRegex::new("|");
   |                                                     ^^^
   |
   = help: the regex is unlikely to be useful as it is
error: regex syntax error on position 0: unclosed group
  --> $DIR/regex.rs:24:41
   |
24 |     let some_binary_regex = BRegex::new(OPENING_PAREN);
   |                                         ^^^^^^^^^^^^^
error: regex syntax error on position 0: unclosed group
  --> $DIR/regex.rs:25:56
   |
25 |     let some_binary_regex_builder = BRegexBuilder::new(OPENING_PAREN);
   |                                                        ^^^^^^^^^^^^^
error: regex syntax error on position 0: unclosed group
  --> $DIR/regex.rs:40:9
   |
40 |         OPENING_PAREN,
   |         ^^^^^^^^^^^^^
error: regex syntax error on position 0: unclosed group
  --> $DIR/regex.rs:44:9
   |
44 |         OPENING_PAREN,
   |         ^^^^^^^^^^^^^
error: regex syntax error: unrecognized escape sequence
  --> $DIR/regex.rs:48:45
   |
48 |     let raw_string_error = Regex::new(r"[...//...]");
   |                                             ^^
error: regex syntax error: unrecognized escape sequence
  --> $DIR/regex.rs:49:46
   |
49 |     let raw_string_error = Regex::new(r#"[...//...]"#);
   |                                              ^^
error: trivial regex
  --> $DIR/regex.rs:53:33
   |
53 |     let trivial_eq = Regex::new("^foobar$");
   |                                 ^^^^^^^^^^
   |
   = help: consider using `==` on `str`s
error: trivial regex
  --> $DIR/regex.rs:55:48
   |
55 |     let trivial_eq_builder = RegexBuilder::new("^foobar$");
   |                                                ^^^^^^^^^^
   |
   = help: consider using `==` on `str`s
error: trivial regex
  --> $DIR/regex.rs:57:42
   |
57 |     let trivial_starts_with = Regex::new("^foobar");
   |                                          ^^^^^^^^^
   |
   = help: consider using `str::starts_with`
error: trivial regex
  --> $DIR/regex.rs:59:40
   |
59 |     let trivial_ends_with = Regex::new("foobar$");
   |                                        ^^^^^^^^^
   |
   = help: consider using `str::ends_with`
error: trivial regex
  --> $DIR/regex.rs:61:39
   |
61 |     let trivial_contains = Regex::new("foobar");
   |                                       ^^^^^^^^
   |
   = help: consider using `str::contains`
error: trivial regex
  --> $DIR/regex.rs:63:39
   |
63 |     let trivial_contains = Regex::new(NOT_A_REAL_REGEX);
   |                                       ^^^^^^^^^^^^^^^^
   |
   = help: consider using `str::contains`
error: trivial regex
  --> $DIR/regex.rs:65:40
   |
65 |     let trivial_backslash = Regex::new("a/.b");
   |                                        ^^^^^^^
   |
   = help: consider using `str::contains`
error: trivial regex
  --> $DIR/regex.rs:68:36
   |
68 |     let trivial_empty = Regex::new("");
   |                                    ^^
   |
   = help: the regex is unlikely to be useful as it is
error: trivial regex
  --> $DIR/regex.rs:70:36
   |
70 |     let trivial_empty = Regex::new("^");
   |                                    ^^^
   |
   = help: the regex is unlikely to be useful as it is
error: trivial regex
  --> $DIR/regex.rs:72:36
   |
72 |     let trivial_empty = Regex::new("^$");
   |                                    ^^^^
   |
   = help: consider using `str::is_empty`
error: trivial regex
  --> $DIR/regex.rs:74:44
   |
74 |     let binary_trivial_empty = BRegex::new("^$");
   |                                            ^^^^
   |
   = help: consider using `str::is_empty`
error: aborting due to 23 previous errors
diff of stderr:
-error: trivial regex
-  --> $DIR/regex.rs:16:45
-   |
-16 |     let pipe_in_wrong_position = Regex::new("|");
-   |                                             ^^^
-   |
-   = note: `-D trivial-regex` implied by `-D warnings`
-   = help: the regex is unlikely to be useful as it is
+error[E0464]: multiple matching crates for `regex`
+ --> $DIR/regex.rs:7:1
+  |
+7 | extern crate regex;
+  | ^^^^^^^^^^^^^^^^^^^
+  |
+  = note: candidates:
+          crate `regex`: /home/matthias/rust-clippy/target/debug/deps/libregex-675feed4e989e2c7.rlib
-error: trivial regex
-  --> $DIR/regex.rs:17:60
-   |
-17 |     let pipe_in_wrong_position_builder = RegexBuilder::new("|");
-   |                                                            ^^^
-   |
-   = help: the regex is unlikely to be useful as it is
+error[E0514]: found crate `regex` compiled by an incompatible version of rustc
+ --> $DIR/regex.rs:7:1
+  |
+7 | extern crate regex;
+  | ^^^^^^^^^^^^^^^^^^^
+  |
+  = help: please recompile that crate using this compiler (rustc 1.26.0-nightly (ae544ee1c 2018-03-29))
+  = note: the following crate versions were found:
+          crate `regex` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libregex_syntax-545ef797e48b20ad.rlib
+          crate `regex` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libregex-4ccd5a559b909c15.rlib
-error: regex syntax error: invalid character class range, the start must be <= the end
-  --> $DIR/regex.rs:18:42
-   |
-18 |     let wrong_char_ranice = Regex::new("[z-a]");
-   |                                          ^^^
-   |
-   = note: `-D invalid-regex` implied by `-D warnings`
+error: aborting due to 2 previous errors
-error: regex syntax error: invalid character class range, the start must be <= the end
-  --> $DIR/regex.rs:19:37
-   |
-19 |     let some_unicode = Regex::new("[é-è]");
-   |                                     ^^^
-
-error: regex syntax error on position 0: unclosed group
-  --> $DIR/regex.rs:21:33
-   |
-21 |     let some_regex = Regex::new(OPENING_PAREN);
-   |                                 ^^^^^^^^^^^^^
-
-error: trivial regex
-  --> $DIR/regex.rs:23:53
-   |
-23 |     let binary_pipe_in_wrong_position = BRegex::new("|");
-   |                                                     ^^^
-   |
-   = help: the regex is unlikely to be useful as it is
-
-error: regex syntax error on position 0: unclosed group
-  --> $DIR/regex.rs:24:41
-   |
-24 |     let some_binary_regex = BRegex::new(OPENING_PAREN);
-   |                                         ^^^^^^^^^^^^^
-
-error: regex syntax error on position 0: unclosed group
-  --> $DIR/regex.rs:25:56
-   |
-25 |     let some_binary_regex_builder = BRegexBuilder::new(OPENING_PAREN);
-   |                                                        ^^^^^^^^^^^^^
-
-error: regex syntax error on position 0: unclosed group
-  --> $DIR/regex.rs:40:9
-   |
-40 |         OPENING_PAREN,
-   |         ^^^^^^^^^^^^^
-
-error: regex syntax error on position 0: unclosed group
-  --> $DIR/regex.rs:44:9
-   |
-44 |         OPENING_PAREN,
-   |         ^^^^^^^^^^^^^
-
-error: regex syntax error: unrecognized escape sequence
-  --> $DIR/regex.rs:48:45
-   |
-48 |     let raw_string_error = Regex::new(r"[...//...]");
-   |                                             ^^
-
-error: regex syntax error: unrecognized escape sequence
-  --> $DIR/regex.rs:49:46
-   |
-49 |     let raw_string_error = Regex::new(r#"[...//...]"#);
-   |                                              ^^
-
-error: trivial regex
-  --> $DIR/regex.rs:53:33
-   |
-53 |     let trivial_eq = Regex::new("^foobar$");
-   |                                 ^^^^^^^^^^
-   |
-   = help: consider using `==` on `str`s
-
-error: trivial regex
-  --> $DIR/regex.rs:55:48
-   |
-55 |     let trivial_eq_builder = RegexBuilder::new("^foobar$");
-   |                                                ^^^^^^^^^^
-   |
-   = help: consider using `==` on `str`s
-
-error: trivial regex
-  --> $DIR/regex.rs:57:42
-   |
-57 |     let trivial_starts_with = Regex::new("^foobar");
-   |                                          ^^^^^^^^^
-   |
-   = help: consider using `str::starts_with`
-
-error: trivial regex
-  --> $DIR/regex.rs:59:40
-   |
-59 |     let trivial_ends_with = Regex::new("foobar$");
-   |                                        ^^^^^^^^^
-   |
-   = help: consider using `str::ends_with`
-
-error: trivial regex
-  --> $DIR/regex.rs:61:39
-   |
-61 |     let trivial_contains = Regex::new("foobar");
-   |                                       ^^^^^^^^
-   |
-   = help: consider using `str::contains`
-
-error: trivial regex
-  --> $DIR/regex.rs:63:39
-   |
-63 |     let trivial_contains = Regex::new(NOT_A_REAL_REGEX);
-   |                                       ^^^^^^^^^^^^^^^^
-   |
-   = help: consider using `str::contains`
-
-error: trivial regex
-  --> $DIR/regex.rs:65:40
-   |
-65 |     let trivial_backslash = Regex::new("a/.b");
-   |                                        ^^^^^^^
-   |
-   = help: consider using `str::contains`
-
-error: trivial regex
-  --> $DIR/regex.rs:68:36
-   |
-68 |     let trivial_empty = Regex::new("");
-   |                                    ^^
-   |
-   = help: the regex is unlikely to be useful as it is
-
-error: trivial regex
-  --> $DIR/regex.rs:70:36
-   |
-70 |     let trivial_empty = Regex::new("^");
-   |                                    ^^^
-   |
-   = help: the regex is unlikely to be useful as it is
-
-error: trivial regex
-  --> $DIR/regex.rs:72:36
-   |
-72 |     let trivial_empty = Regex::new("^$");
-   |                                    ^^^^
-   |
-   = help: consider using `str::is_empty`
-
-error: trivial regex
-  --> $DIR/regex.rs:74:44
-   |
-74 |     let binary_trivial_empty = BRegex::new("^$");
-   |                                            ^^^^
-   |
-   = help: consider using `str::is_empty`
-
-error: aborting due to 23 previous errors
-
+Some errors occurred: E0464, E0514.
+For more information about an error, try `rustc --explain E0464`.
The actual stderr differed from the expected stderr.
Actual stderr saved to /home/matthias/rust-clippy/target/debug/test_build_base/regex.stderr
To update references, run this command from build directory:
tests/ui/update-references.sh '/home/matthias/rust-clippy/target/debug/test_build_base' 'regex.rs'
error: 1 errors occurred comparing output.
status: exit code: 101
command: "target/debug/clippy-driver" "tests/ui/regex.rs" "-L" "/home/matthias/rust-clippy/target/debug/test_build_base" "--target=x86_64-unknown-linux-gnu" "-C" "prefer-dynamic" "-o" "/home/matthias/rust-clippy/target/debug/test_build_base/regex.stage-id" "-L" "target/debug" "-L" "target/debug/deps" "-Dwarnings" "-L" "/home/matthias/rust-clippy/target/debug/test_build_base/regex.stage-id.aux" "-A" "unused"
stdout:
------------------------------------------
------------------------------------------
stderr:
------------------------------------------
error[E0464]: multiple matching crates for `regex`
 --> tests/ui/regex.rs:7:1
  |
7 | extern crate regex;
  | ^^^^^^^^^^^^^^^^^^^
  |
  = note: candidates:
          crate `regex`: /home/matthias/rust-clippy/target/debug/deps/libregex-675feed4e989e2c7.rlib
error[E0514]: found crate `regex` compiled by an incompatible version of rustc
 --> tests/ui/regex.rs:7:1
  |
7 | extern crate regex;
  | ^^^^^^^^^^^^^^^^^^^
  |
  = help: please recompile that crate using this compiler (rustc 1.26.0-nightly (ae544ee1c 2018-03-29))
  = note: the following crate versions were found:
          crate `regex` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libregex_syntax-545ef797e48b20ad.rlib
          crate `regex` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libregex-4ccd5a559b909c15.rlib
error: aborting due to 2 previous errors
Some errors occurred: E0464, E0514.
For more information about an error, try `rustc --explain E0464`.
------------------------------------------
thread '[ui] ui/regex.rs' panicked at 'explicit panic', /home/matthias/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/compiletest_rs-0.3.9/src/runtest.rs:2539:9
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- [ui] ui/serde.rs stdout ----
    normalized stderr:
error[E0464]: multiple matching crates for `serde`
 --> $DIR/serde.rs:6:1
  |
6 | extern crate serde;
  | ^^^^^^^^^^^^^^^^^^^
  |
  = note: candidates:
          crate `serde`: /home/matthias/rust-clippy/target/debug/deps/libserde-d18100ee91b3640a.rlib
error[E0514]: found crate `serde` compiled by an incompatible version of rustc
 --> $DIR/serde.rs:6:1
  |
6 | extern crate serde;
  | ^^^^^^^^^^^^^^^^^^^
  |
  = help: please recompile that crate using this compiler (rustc 1.26.0-nightly (ae544ee1c 2018-03-29))
  = note: the following crate versions were found:
          crate `serde` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libserde_json-db7e52ba9e91e774.rlib
          crate `serde` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libserde_derive-41da0132bcc3c37d.so
          crate `serde` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libserde_derive_internals-7fc8ef425398707f.rlib
          crate `serde` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libserde-a08a2b6beca6b10b.rlib
error: aborting due to 2 previous errors
Some errors occurred: E0464, E0514.
For more information about an error, try `rustc --explain E0464`.
expected stderr:
error: you should not implement `visit_string` without also implementing `visit_str`
  --> $DIR/serde.rs:39:5
   |
39 | /     fn visit_string<E>(self, _v: String) -> Result<Self::Value, E>
40 | |         where E: serde::de::Error,
41 | |     {
42 | |         unimplemented!()
43 | |     }
   | |_____^
   |
   = note: `-D serde-api-misuse` implied by `-D warnings`
error: aborting due to previous error
diff of stderr:
-error: you should not implement `visit_string` without also implementing `visit_str`
-  --> $DIR/serde.rs:39:5
-   |
-39 | /     fn visit_string<E>(self, _v: String) -> Result<Self::Value, E>
-40 | |         where E: serde::de::Error,
-41 | |     {
-42 | |         unimplemented!()
-43 | |     }
-   | |_____^
-   |
-   = note: `-D serde-api-misuse` implied by `-D warnings`
+error[E0464]: multiple matching crates for `serde`
+ --> $DIR/serde.rs:6:1
+  |
+6 | extern crate serde;
+  | ^^^^^^^^^^^^^^^^^^^
+  |
+  = note: candidates:
+          crate `serde`: /home/matthias/rust-clippy/target/debug/deps/libserde-d18100ee91b3640a.rlib
-error: aborting due to previous error
+error[E0514]: found crate `serde` compiled by an incompatible version of rustc
+ --> $DIR/serde.rs:6:1
+  |
+6 | extern crate serde;
+  | ^^^^^^^^^^^^^^^^^^^
+  |
+  = help: please recompile that crate using this compiler (rustc 1.26.0-nightly (ae544ee1c 2018-03-29))
+  = note: the following crate versions were found:
+          crate `serde` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libserde_json-db7e52ba9e91e774.rlib
+          crate `serde` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libserde_derive-41da0132bcc3c37d.so
+          crate `serde` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libserde_derive_internals-7fc8ef425398707f.rlib
+          crate `serde` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libserde-a08a2b6beca6b10b.rlib
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0464, E0514.
+For more information about an error, try `rustc --explain E0464`.
The actual stderr differed from the expected stderr.
Actual stderr saved to /home/matthias/rust-clippy/target/debug/test_build_base/serde.stderr
To update references, run this command from build directory:
tests/ui/update-references.sh '/home/matthias/rust-clippy/target/debug/test_build_base' 'serde.rs'
error: 1 errors occurred comparing output.
status: exit code: 101
command: "target/debug/clippy-driver" "tests/ui/serde.rs" "-L" "/home/matthias/rust-clippy/target/debug/test_build_base" "--target=x86_64-unknown-linux-gnu" "-C" "prefer-dynamic" "-o" "/home/matthias/rust-clippy/target/debug/test_build_base/serde.stage-id" "-L" "target/debug" "-L" "target/debug/deps" "-Dwarnings" "-L" "/home/matthias/rust-clippy/target/debug/test_build_base/serde.stage-id.aux" "-A" "unused"
stdout:
------------------------------------------
------------------------------------------
stderr:
------------------------------------------
error[E0464]: multiple matching crates for `serde`
 --> tests/ui/serde.rs:6:1
  |
6 | extern crate serde;
  | ^^^^^^^^^^^^^^^^^^^
  |
  = note: candidates:
          crate `serde`: /home/matthias/rust-clippy/target/debug/deps/libserde-d18100ee91b3640a.rlib
error[E0514]: found crate `serde` compiled by an incompatible version of rustc
 --> tests/ui/serde.rs:6:1
  |
6 | extern crate serde;
  | ^^^^^^^^^^^^^^^^^^^
  |
  = help: please recompile that crate using this compiler (rustc 1.26.0-nightly (ae544ee1c 2018-03-29))
  = note: the following crate versions were found:
          crate `serde` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libserde_json-db7e52ba9e91e774.rlib
          crate `serde` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libserde_derive-41da0132bcc3c37d.so
          crate `serde` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libserde_derive_internals-7fc8ef425398707f.rlib
          crate `serde` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libserde-a08a2b6beca6b10b.rlib
error: aborting due to 2 previous errors
Some errors occurred: E0464, E0514.
For more information about an error, try `rustc --explain E0464`.
------------------------------------------
thread '[ui] ui/serde.rs' panicked at 'explicit panic', /home/matthias/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/compiletest_rs-0.3.9/src/runtest.rs:2539:9
---- [ui] ui/useless_attribute.rs stdout ----
    normalized stderr:
error[E0464]: multiple matching crates for `clippy_lints`
 --> $DIR/useless_attribute.rs:9:1
  |
9 | extern crate clippy_lints;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: candidates:
          crate `clippy_lints`: /home/matthias/rust-clippy/target/debug/deps/libclippy_lints-814f215f3addd0a4.rlib
error[E0514]: found crate `clippy_lints` compiled by an incompatible version of rustc
 --> $DIR/useless_attribute.rs:9:1
  |
9 | extern crate clippy_lints;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = help: please recompile that crate using this compiler (rustc 1.26.0-nightly (ae544ee1c 2018-03-29))
  = note: the following crate versions were found:
          crate `clippy_lints` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libclippy_lints-6cd45c03a2306664.rlib
error: aborting due to 2 previous errors
Some errors occurred: E0464, E0514.
For more information about an error, try `rustc --explain E0464`.
expected stderr:
error: useless lint attribute
 --> $DIR/useless_attribute.rs:5:1
  |
5 | #[allow(dead_code, unused_extern_crates)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if you just forgot a `!`, use: `#![allow(dead_code, unused_extern_crates)]`
  |
  = note: `-D useless-attribute` implied by `-D warnings`
error: useless lint attribute
 --> $DIR/useless_attribute.rs:6:1
  |
6 | #[cfg_attr(feature = "cargo-clippy", allow(dead_code, unused_extern_crates))]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if you just forgot a `!`, use: `#![cfg_attr(feature = "cargo-clippy", allow(dead_code, unused_extern_crates))`
error: aborting due to 2 previous errors
diff of stderr:
-error: useless lint attribute
- --> $DIR/useless_attribute.rs:5:1
+error[E0464]: multiple matching crates for `clippy_lints`
+ --> $DIR/useless_attribute.rs:9:1
   |
-5 | #[allow(dead_code, unused_extern_crates)]
-  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if you just forgot a `!`, use: `#![allow(dead_code, unused_extern_crates)]`
+9 | extern crate clippy_lints;
+  | ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
-  = note: `-D useless-attribute` implied by `-D warnings`
+  = note: candidates:
+          crate `clippy_lints`: /home/matthias/rust-clippy/target/debug/deps/libclippy_lints-814f215f3addd0a4.rlib
-error: useless lint attribute
- --> $DIR/useless_attribute.rs:6:1
+error[E0514]: found crate `clippy_lints` compiled by an incompatible version of rustc
+ --> $DIR/useless_attribute.rs:9:1
   |
-6 | #[cfg_attr(feature = "cargo-clippy", allow(dead_code, unused_extern_crates))]
-  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if you just forgot a `!`, use: `#![cfg_attr(feature = "cargo-clippy", allow(dead_code, unused_extern_crates))`
+9 | extern crate clippy_lints;
+  | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+  |
+  = help: please recompile that crate using this compiler (rustc 1.26.0-nightly (ae544ee1c 2018-03-29))
+  = note: the following crate versions were found:
+          crate `clippy_lints` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libclippy_lints-6cd45c03a2306664.rlib
 error: aborting due to 2 previous errors
+Some errors occurred: E0464, E0514.
+For more information about an error, try `rustc --explain E0464`.
The actual stderr differed from the expected stderr.
Actual stderr saved to /home/matthias/rust-clippy/target/debug/test_build_base/useless_attribute.stderr
To update references, run this command from build directory:
tests/ui/update-references.sh '/home/matthias/rust-clippy/target/debug/test_build_base' 'useless_attribute.rs'
error: 1 errors occurred comparing output.
status: exit code: 101
command: "target/debug/clippy-driver" "tests/ui/useless_attribute.rs" "-L" "/home/matthias/rust-clippy/target/debug/test_build_base" "--target=x86_64-unknown-linux-gnu" "-C" "prefer-dynamic" "-o" "/home/matthias/rust-clippy/target/debug/test_build_base/useless_attribute.stage-id" "-L" "target/debug" "-L" "target/debug/deps" "-Dwarnings" "-L" "/home/matthias/rust-clippy/target/debug/test_build_base/useless_attribute.stage-id.aux" "-A" "unused"
stdout:
------------------------------------------
------------------------------------------
stderr:
------------------------------------------
error[E0464]: multiple matching crates for `clippy_lints`
 --> tests/ui/useless_attribute.rs:9:1
  |
9 | extern crate clippy_lints;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: candidates:
          crate `clippy_lints`: /home/matthias/rust-clippy/target/debug/deps/libclippy_lints-814f215f3addd0a4.rlib
error[E0514]: found crate `clippy_lints` compiled by an incompatible version of rustc
 --> tests/ui/useless_attribute.rs:9:1
  |
9 | extern crate clippy_lints;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = help: please recompile that crate using this compiler (rustc 1.26.0-nightly (ae544ee1c 2018-03-29))
  = note: the following crate versions were found:
          crate `clippy_lints` compiled by rustc 1.26.0-nightly (188e693b3 2018-03-26): /home/matthias/rust-clippy/target/debug/deps/libclippy_lints-6cd45c03a2306664.rlib
error: aborting due to 2 previous errors
Some errors occurred: E0464, E0514.
For more information about an error, try `rustc --explain E0464`.
------------------------------------------
thread '[ui] ui/useless_attribute.rs' panicked at 'explicit panic', /home/matthias/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/compiletest_rs-0.3.9/src/runtest.rs:2539:9
failures:
    [ui] ui/regex.rs
    [ui] ui/serde.rs
    [ui] ui/useless_attribute.rs
test result: FAILED. 179 passed; 3 failed; 1 ignored; 0 measured; 0 filtered out
test compile_test ... FAILED
failures:
---- compile_test stdout ----
    thread 'compile_test' panicked at 'Some tests failed', /home/matthias/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/compiletest_rs-0.3.9/src/lib.rs:89:22
failures:
    compile_test
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out

@oli-obk
Copy link
Contributor

oli-obk commented Mar 30, 2018

you probably need to cargo clean, because compiletest-rs doesn't know about the current build hash. At least that fixes it for me usually

@matthiaskrgr
Copy link
Member Author

Ah, that worked. Thanks a lot!

@matthiaskrgr
Copy link
Member Author

Hmm no, I still get failures. Something is weird.

@matthiaskrgr matthiaskrgr reopened this Mar 30, 2018
@matthiaskrgr
Copy link
Member Author

Hmm it seems something breaks when calling "cargo test" multiple times?

cargo clean
git clean -dffx #nuke everything
cargo build
cargo test # ok
cargo test # failed

@matthiaskrgr matthiaskrgr changed the title tests failing in git master branch tests failing in git master branch on consecutive "cargo test"s Mar 30, 2018
@ghost
Copy link

ghost commented Mar 30, 2018

I have to cargo clean after every test now as well.

@phansch phansch added the C-bug Category: Clippy is not doing the correct thing label Mar 30, 2018
@flip1995
Copy link
Member

My workaround here is to just delete the files causing this error:

rm target/debug/deps/{libserde,libregex,libclippy_lints}*

With cargo clean the compilation after every test takes so long.

@oli-obk
Copy link
Contributor

oli-obk commented Mar 31, 2018

I'm guessing it's the dogfood test, which seems to be using the wrong rustc. In the above example, the crates seem to have been built with 188e693b3 2018-03-26, but the current rustc is ae544ee1c 2018-03-29

@oli-obk
Copy link
Contributor

oli-obk commented Mar 31, 2018

Jup, it's the dogfood test. You can disable it for now by renaming/removing it locally.

I'm juggling a few rustc PRs atm, so any help in fixing dogfood is appreciated.

@matthiaskrgr
Copy link
Member Author

Seems to be fixed, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing
Projects
None yet
Development

No branches or pull requests

4 participants