Skip to content

Instantly share code, notes, and snippets.

@Sh4pe
Created April 28, 2018 18:22
Show Gist options
  • Save Sh4pe/39559aebc0756f9477b8eec8c19b32b2 to your computer and use it in GitHub Desktop.
Save Sh4pe/39559aebc0756f9477b8eec8c19b32b2 to your computer and use it in GitHub Desktop.
Problems with clippy
% cargo +nightly build --features "clippy"
Compiling clippy_lints v0.0.195
error[E0432]: unresolved import `syntax::abi`
--> /Users/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.195/src/utils/mod.rs:141:28
|
141 | .all(|(a, &b)| *a == *b)
| ^^
error[E0308]: mismatched types
--> /Users/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.195/src/utils/internal_lints.rs:83:36
|
83 | if **last_name > *name {
| ^^^^^^^^^^^
error[E0308]: mismatched types
--> /Users/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.195/src/enum_variants.rs:163:21
|
163 | && name.chars()
| ^^^^^
error[E0308]: mismatched types
--> /Users/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-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/david/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.195/src/write.rs:397:19
|
397 | if fmtstr.deref() == "\n";
| ^^^^^
error[E0308]: mismatched types
--> /Users/david/.cargo/registry/src/github.com-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: Could not compile `clippy_lints`.
To learn more, run the command again with --verbose.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment