Skip to content

Build seems to be buggy #2702

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

Closed
Lucretiel opened this issue Apr 28, 2018 · 9 comments
Closed

Build seems to be buggy #2702

Lucretiel opened this issue Apr 28, 2018 · 9 comments

Comments

@Lucretiel
Copy link

I have tried all of the following methods to install clippy, but all of them are failing with compile errors. These are consistent with the current failures in Travis CI.

$ cargo install clippy
$ cargo +nightly install clippy
$ rustup default nightly && cargo install clippy
$ rustup default nightly && cargo +nightly install clippy
@Lucretiel
Copy link
Author

Here's my compile errors; they seem to be the same as the current Travis build. There wasn't a lot that changed between the last good build; from the compile errors, it looks like the syntax package renamed a bunch of stuff.

error[E0432]: unresolved import `syntax::abi`
 --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/functions.rs:8:13
  |
8 | use syntax::abi::Abi;
  |             ^^^ Could not find `abi` in `syntax`

error[E0432]: unresolved import `syntax::abi`
 --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/needless_pass_by_value.rs:9:13
  |
9 | use syntax::abi::Abi;
  |             ^^^ Could not find `abi` in `syntax`

error[E0614]: type `syntax::symbol::InternedString` cannot be dereferenced
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/utils/mod.rs:141:28
    |
141 |             .all(|(a, &b)| *a == *b)
    |                            ^^

error[E0308]: mismatched types
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/utils/mod.rs:129:29
    |
129 |             self.names.push(symbol::Symbol::intern(text).as_str());
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found struct `syntax::symbol::LocalInternedString`
    |
    = note: expected type `syntax::symbol::InternedString`
               found type `syntax::symbol::LocalInternedString`

error[E0599]: no method named `evaluate_obligation_conservatively` found for type `rustc::traits::SelectionContext<'_, '_, '_>` in the current scope
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/utils/mod.rs:305:47
    |
305 |         traits::SelectionContext::new(&infcx).evaluate_obligation_conservatively(&obligation)
    |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: did you mean `evaluate_obligation_recursively`?

error[E0599]: no variant named `from_attr` found for type `rustc::ty::layout::Integer` in the current scope
    --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/utils/mod.rs:1068:5
     |
1068 |     layout::Integer::from_attr(tcx, attr::IntType::SignedInt(ity)).size().bits()
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ variant not found in `rustc::ty::layout::Integer`
     |
     = help: items from traits can only be used if the trait is in scope
     = note: the following trait is implemented but not in scope, perhaps add a `use` for it:
             candidate #1: `use rustc::ty::layout::IntegerExt;`

error[E0599]: no variant named `from_attr` found for type `rustc::ty::layout::Integer` in the current scope
    --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/utils/mod.rs:1085:16
     |
1085 |     let bits = layout::Integer::from_attr(tcx, attr::IntType::UnsignedInt(ity)).size().bits();
     |                ^^^^^^^^^^^^^^^^^^^^^^^^^^ variant not found in `rustc::ty::layout::Integer`
     |
     = help: items from traits can only be used if the trait is in scope
     = note: the following trait is implemented but not in scope, perhaps add a `use` for it:
             candidate #1: `use rustc::ty::layout::IntegerExt;`

error[E0614]: type `syntax::symbol::InternedString` cannot be dereferenced
  --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/utils/internal_lints.rs:83:36
   |
83 |                                 if **last_name > *name {
   |                                    ^^^^^^^^^^^

error[E0308]: mismatched types
  --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/utils/internal_lints.rs:93:46
   |
93 |                             last_name = Some(name);
   |                                              ^^^^ expected struct `syntax::symbol::InternedString`, found struct `syntax::symbol::LocalInternedString`
   |
   = note: expected type `syntax::symbol::InternedString`
              found type `syntax::symbol::LocalInternedString`

error[E0308]: mismatched types
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/copies.rs:273:53
    |
273 |                 if let Entry::Vacant(v) = map.entry(ident.node.as_str()) {
    |                                                     ^^^^^^^^^^^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found struct `syntax::symbol::LocalInternedString`
    |
    = note: expected type `syntax::symbol::InternedString`
               found type `syntax::symbol::LocalInternedString`

error[E0308]: mismatched types
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/enum_variants.rs:122:5
    |
121 | fn var2str(var: &Variant) -> InternedString {
    |                              -------------- expected `syntax::symbol::InternedString` because of return type
122 |     var.node.ident.name.as_str()
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found struct `syntax::symbol::LocalInternedString`
    |
    = note: expected type `syntax::symbol::InternedString`
               found type `syntax::symbol::LocalInternedString`

error[E0308]: mismatched types
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/enum_variants.rs:162:37
    |
162 |         if partial_match(item_name, &name) == item_name_chars
    |                                     ^^^^^ expected str, found struct `syntax::symbol::InternedString`
    |
    = note: expected type `&str`
               found type `&syntax::symbol::InternedString`

error[E0599]: no method named `chars` found for type `syntax::symbol::InternedString` in the current scope
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/enum_variants.rs:163:21
    |
163 |             && name.chars()
    |                     ^^^^^

error[E0308]: mismatched types
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/enum_variants.rs:169:38
    |
169 |         if partial_rmatch(item_name, &name) == item_name_chars {
    |                                      ^^^^^ expected str, found struct `syntax::symbol::InternedString`
    |
    = note: expected type `&str`
               found type `&syntax::symbol::InternedString`

error[E0614]: type `syntax::symbol::InternedString` cannot be dereferenced
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/enum_variants.rs:174:46
    |
174 |     let mut pre = &first[..camel_case_until(&*first)];
    |                                              ^^^^^^

error[E0608]: cannot index into a value of type `syntax::symbol::InternedString`
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/enum_variants.rs:174:20
    |
174 |     let mut pre = &first[..camel_case_until(&*first)];
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0614]: type `syntax::symbol::InternedString` cannot be dereferenced
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/enum_variants.rs:175:44
    |
175 |     let mut post = &first[camel_case_from(&*first)..];
    |                                            ^^^^^^

error[E0608]: cannot index into a value of type `syntax::symbol::InternedString`
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/enum_variants.rs:175:21
    |
175 |     let mut post = &first[camel_case_from(&*first)..];
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/enum_variants.rs:179:44
    |
179 |         let pre_match = partial_match(pre, &name);
    |                                            ^^^^^ expected str, found struct `syntax::symbol::InternedString`
    |
    = note: expected type `&str`
               found type `&syntax::symbol::InternedString`

error[E0608]: cannot index into a value of type `syntax::symbol::InternedString`
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/enum_variants.rs:183:40
    |
183 |         while let Some((next, last)) = name[pre.len()..].chars().zip(pre.chars().rev()).next() {
    |                                        ^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/enum_variants.rs:193:47
    |
193 |         let post_match = partial_rmatch(post, &name);
    |                                               ^^^^^ expected str, found struct `syntax::symbol::InternedString`
    |
    = note: expected type `&str`
               found type `&syntax::symbol::InternedString`

error[E0308]: mismatched types
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/enum_variants.rs:293:28
    |
293 |         self.modules.push((item_name, item_camel));
    |                            ^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found struct `syntax::symbol::LocalInternedString`
    |
    = note: expected type `syntax::symbol::InternedString`
               found type `syntax::symbol::LocalInternedString`

error[E0308]: mismatched types
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/non_expressive_names.rs:179:87
    |
179 |                 if existing_name.len - count != 1 || levenstein_not_1(&interned_name, &existing_name.interned) {
    |                                                                                       ^^^^^^^^^^^^^^^^^^^^^^^ expected str, found struct `syntax::symbol::InternedString`
    |
    = note: expected type `&str`
               found type `&syntax::symbol::InternedString`

error[E0308]: mismatched types
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/non_expressive_names.rs:183:71
    |
183 |                 if count - existing_name.len != 1 || levenstein_not_1(&existing_name.interned, &interned_name) {
    |                                                                       ^^^^^^^^^^^^^^^^^^^^^^^ expected str, found struct `syntax::symbol::InternedString`
    |
    = note: expected type `&str`
               found type `&syntax::symbol::InternedString`

error[E0599]: no method named `chars` found for type `syntax::symbol::InternedString` in the current scope
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/non_expressive_names.rs:188:65
    |
188 |                 let mut existing_chars = existing_name.interned.chars();
    |                                                                 ^^^^^

error[E0308]: mismatched types
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/non_expressive_names.rs:269:23
    |
269 |             interned: interned_name,
    |                       ^^^^^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found struct `syntax::symbol::LocalInternedString`
    |
    = note: expected type `syntax::symbol::InternedString`
               found type `syntax::symbol::LocalInternedString`

error[E0308]: mismatched types
  --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/unsafe_removed_from_name.rs:68:24
   |
68 |     if contains_unsafe(&old_str) && !contains_unsafe(&new_str) {
   |                        ^^^^^^^^ expected struct `syntax::symbol::InternedString`, found struct `syntax::symbol::LocalInternedString`
   |
   = note: expected type `&syntax::symbol::InternedString`
              found type `&syntax::symbol::LocalInternedString`

error[E0308]: mismatched types
  --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/unsafe_removed_from_name.rs:68:54
   |
68 |     if contains_unsafe(&old_str) && !contains_unsafe(&new_str) {
   |                                                      ^^^^^^^^ expected struct `syntax::symbol::InternedString`, found struct `syntax::symbol::LocalInternedString`
   |
   = note: expected type `&syntax::symbol::InternedString`
              found type `&syntax::symbol::LocalInternedString`

error[E0599]: no method named `contains` found for type `&syntax::symbol::InternedString` in the current scope
  --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/unsafe_removed_from_name.rs:79:10
   |
79 |     name.contains("Unsafe") || name.contains("unsafe")
   |          ^^^^^^^^

error[E0599]: no method named `contains` found for type `&syntax::symbol::InternedString` in the current scope
  --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/unsafe_removed_from_name.rs:79:37
   |
79 |     name.contains("Unsafe") || name.contains("unsafe")
   |                                     ^^^^^^^^

error[E0308]: mismatched types
  --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/unused_label.rs:73:36
   |
73 |                 self.labels.remove(&label.name.as_str());
   |                                    ^^^^^^^^^^^^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found struct `syntax::symbol::LocalInternedString`
   |
   = note: expected type `&syntax::symbol::InternedString`
              found type `&syntax::symbol::LocalInternedString`

error[E0308]: mismatched types
  --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/unused_label.rs:76:36
   |
76 |                 self.labels.insert(label.name.as_str(), expr.span);
   |                                    ^^^^^^^^^^^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found struct `syntax::symbol::LocalInternedString`
   |
   = note: expected type `syntax::symbol::InternedString`
              found type `syntax::symbol::LocalInternedString`

error[E0599]: no method named `chars` found for type `syntax::symbol::InternedString` in the current scope
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/write.rs:378:36
    |
378 |         if let Some('\n') = fmtstr.chars().last();
    |                                    ^^^^^

error[E0599]: no method named `deref` found for type `syntax::symbol::InternedString` in the current scope
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/write.rs:397:19
    |
397 |         if fmtstr.deref() == "\n";
    |                   ^^^^^

error[E0308]: mismatched types
   --> /Users/nathan/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/clippy_lints-0.0.195/src/write.rs:421:26
    |
421 |             return Some((lit.as_str(), exprs.len()));
    |                          ^^^^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found struct `syntax::symbol::LocalInternedString`
    |
    = note: expected type `syntax::symbol::InternedString`
               found type `syntax::symbol::LocalInternedString`

error: aborting due to 35 previous errors

Some errors occurred: E0308, E0432, E0599, E0608, E0614.
For more information about an error, try `rustc --explain E0308`.
error: failed to compile `clippy v0.0.195`, intermediate artifacts can be found at `/var/folders/wz/6yrkpbhd6c710khnkrrh70kr0000gn/T/cargo-installsnADpU`

Caused by:
  Could not compile `clippy_lints`.

To learn more, run the command again with --verbose.

@oli-obk
Copy link
Contributor

oli-obk commented Apr 28, 2018

Maybe we should stop suggesting to install the crates.io version and instead suggest the master branch

@vasily-kirichenko
Copy link

I have the same error installing from master:

git clone https://github.com/rust-lang-nursery/rust-clippy.git
cd rust-clippy
cargo install
Compiling clippy_lints v0.0.195 (file:///C:/WLCR/github/rust-clippy/clippy_lints)
error[E0432]: unresolved import `syntax::symbol::LocalInternedString`
 --> clippy_lints\src\utils\internal_lints.rs:5:5
  |
5 | use syntax::symbol::LocalInternedString;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LocalInternedString` in `symbol`. Did you mean to use `InternedString`?

error[E0432]: unresolved import `syntax::symbol::LocalInternedString`
 --> clippy_lints\src\copies.rs:6:5
  |
6 | use syntax::symbol::LocalInternedString;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LocalInternedString` in `symbol`. Did you mean to use `InternedString`?

error[E0432]: unresolved import `syntax::symbol::LocalInternedString`
 --> clippy_lints\src\enum_variants.rs:6:5
  |
6 | use syntax::symbol::LocalInternedString;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LocalInternedString` in `symbol`. Did you mean to use `InternedString`?

error[E0432]: unresolved import `syntax::symbol::LocalInternedString`
 --> clippy_lints\src\non_expressive_names.rs:3:5
  |
3 | use syntax::symbol::LocalInternedString;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LocalInternedString` in `symbol`. Did you mean to use `InternedString`?

error[E0432]: unresolved import `syntax::symbol::LocalInternedString`
 --> clippy_lints\src\unsafe_removed_from_name.rs:4:5
  |
4 | use syntax::symbol::LocalInternedString;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LocalInternedString` in `symbol`. Did you mean to use `InternedString`?

error[E0432]: unresolved import `syntax::symbol::LocalInternedString`
 --> clippy_lints\src\unused_label.rs:7:5
  |
7 | use syntax::symbol::LocalInternedString;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LocalInternedString` in `symbol`. Did you mean to use `InternedString`?

error[E0432]: unresolved import `syntax::symbol::LocalInternedString`
 --> clippy_lints\src\write.rs:7:5
  |
7 | use syntax::symbol::LocalInternedString;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LocalInternedString` in `symbol`. Did you mean to use `InternedString`?

error[E0412]: cannot find type `LocalInternedString` in module `symbol`
   --> clippy_lints\src\utils\mod.rs:119:28
    |
119 |         names: Vec<symbol::LocalInternedString>,
    |                            ^^^^^^^^^^^^^^^^^^^ did you mean `InternedString`?

error[E0599]: no method named `predicate_must_hold` found for type `&rustc::infer::InferCtxt<'_, '_, '_>` in the current scope
   --> clippy_lints\src\utils\mod.rs:305:55
    |
305 |         traits::SelectionContext::new(&infcx).infcx().predicate_must_hold(&obligation)
    |                                                       ^^^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied
   --> clippy_lints\src\enum_variants.rs:161:13
    |
161 |         let name = var2str(var);
    |             ^^^^ `str` does not have a constant size known at compile-time
    |
    = help: the trait `std::marker::Sized` is not implemented for `str`
    = note: all local variables must have a statically known size

error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied
   --> clippy_lints\src\enum_variants.rs:177:13
    |
177 |         let name = var2str(var);
    |             ^^^^ `str` does not have a constant size known at compile-time
    |
    = help: the trait `std::marker::Sized` is not implemented for `str`
    = note: all local variables must have a statically known size

error: aborting due to 11 previous errors

Some errors occurred: E0277, E0412, E0432, E0599.
For more information about an error, try `rustc --explain E0277`.
error: failed to compile `clippy v0.0.195 (file:///C:/WLCR/github/rust-clippy)`, intermediate artifacts can be found at `C:\WLCR\github\rust-clippy\target`

Caused by:
  Could not compile `clippy_lints`.

@oli-obk
Copy link
Contributor

oli-obk commented Apr 28, 2018

Those were fixed by @phansch a few hours ago. Try pulling the most recent version. Maybe we should add a build script that does these version checks

@vasily-kirichenko
Copy link

I pulled 10 minutes ago. Should I pull not master, but a specific branch?

@oli-obk
Copy link
Contributor

oli-obk commented Apr 28, 2018

Oh. maybe then it's your nightly that needs updating?

Even more reason for that build script ^^

@vasily-kirichenko
Copy link

@oli-obk ah, yes, after rustup update everything has become ok. Thanks!

@mati865
Copy link
Contributor

mati865 commented Apr 28, 2018

Maybe we should stop suggesting to install the crates.io version and instead suggest the master branch

@oli-obk I think it would make sense, master branch is usually fixed shortly after new release.

@phansch
Copy link
Member

phansch commented Apr 30, 2018

Closing this in favor of #2704 / #2705

@phansch phansch closed this as completed Apr 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants