Skip to content

Does not compile on 1.15.0-nightly (7b3eeea22 2016-11-21) #1356

Closed
@dtolnay

Description

@dtolnay

Looks like a fun one. See rust-lang/rust#37824.

error[E0432]: unresolved import `syntax::parse::token::InternedString`
 --> clippy_lints/src/utils/internal_lints.rs:5:5
  |
5 | use syntax::parse::token::InternedString;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `InternedString` in `parse::token`

error[E0432]: unresolved import `syntax::parse::token::InternedString`
 --> clippy_lints/src/copies.rs:6:5
  |
6 | use syntax::parse::token::InternedString;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `InternedString` in `parse::token`

error[E0432]: unresolved import `syntax::parse::token::InternedString`
 --> clippy_lints/src/enum_variants.rs:6:5
  |
6 | use syntax::parse::token::InternedString;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `InternedString` in `parse::token`

error[E0432]: unresolved import `syntax::parse::token::InternedString`
 --> clippy_lints/src/non_expressive_names.rs:3:5
  |
3 | use syntax::parse::token::InternedString;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `InternedString` in `parse::token`

error[E0432]: unresolved import `syntax::parse::token::InternedString`
  --> clippy_lints/src/regex.rs:11:5
   |
11 | use syntax::parse::token::InternedString;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `InternedString` in `parse::token`

error[E0432]: unresolved import `syntax::parse::token::InternedString`
 --> clippy_lints/src/unsafe_removed_from_name.rs:5:5
  |
5 | use syntax::parse::token::InternedString;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `InternedString` in `parse::token`

error[E0432]: unresolved import `syntax::parse::token::InternedString`
 --> clippy_lints/src/unused_label.rs:7:5
  |
7 | use syntax::parse::token::InternedString;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `InternedString` in `parse::token`

error[E0532]: expected tuple struct/variant, found unit variant `ast::MetaItemKind::Word`
  --> clippy_lints/src/utils/conf.rs:14:13
   |
14 |             ast::MetaItemKind::Word(ref name) |
   |             ^^^^^^^^^^^^^^^^^^^^^^^

error[E0412]: type name `token::InternedString` is undefined or not in scope
   --> clippy_lints/src/utils/mod.rs:135:20
    |
135 |         names: Vec<token::InternedString>,
    |                    ^^^^^^^^^^^^^^^^^^^^^ undefined or not in scope
    |
    = help: you can import it into scope: `use syntax::symbol::InternedString;`.

error[E0425]: unresolved name `token::intern`
   --> clippy_lints/src/utils/mod.rs:145:29
    |
145 |             self.names.push(token::intern(text).as_str());
    |                             ^^^^^^^^^^^^^ unresolved name

error[E0532]: expected tuple struct/variant, found unit variant `MetaItemKind::Word`
   --> clippy_lints/src/attrs.rs:242:16
    |
242 |         if let MetaItemKind::Word(ref word) = mi.node {
    |                ^^^^^^^^^^^^^^^^^^

error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
  --> clippy_lints/src/utils/conf.rs:15:13
   |
15 |             ast::MetaItemKind::List(ref name, _) => {
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 field, found 2

error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
  --> clippy_lints/src/utils/conf.rs:20:13
   |
20 |             ast::MetaItemKind::NameValue(ref name, ref value) => {
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 field, found 2

error[E0308]: mismatched types
  --> clippy_lints/src/utils/internal_lints.rs:66:96
   |
66 |         if let Some(utils) = krate.module.items.iter().find(|item| item.ident.name.as_str() == "utils") {
   |                                                                                                ^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
   |
   = note: expected type `syntax::symbol::InternedString`
   = note:    found type `&'static str`

error[E0308]: mismatched types
  --> clippy_lints/src/utils/internal_lints.rs:68:101
   |
68 |                 if let Some(paths) = utils_mod.items.iter().find(|item| item.ident.name.as_str() == "paths") {
   |                                                                                                     ^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
   |
   = note: expected type `syntax::symbol::InternedString`
   = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/utils/internal_lints.rs:112:108
    |
112 |             } else if is_lint_array_type(ty) && item.vis == Visibility::Inherited && item.name.as_str() == "ARRAY" {
    |                                                                                                            ^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
  --> clippy_lints/src/utils/higher.rs:64:69
   |
64 |                           .find(|field| field.name.node.as_str() == name)
   |                                                                     ^^^^ expected struct `syntax::symbol::InternedString`, found &str
   |
   = note: expected type `syntax::symbol::InternedString`
   = note:    found type `&str`

error[E0308]: mismatched types
   --> clippy_lints/src/utils/mod.rs:205:91
    |
205 |     path.segments.iter().rev().zip(segments.iter().rev()).all(|(a, b)| a.name.as_str() == *b)
    |                                                                                           ^^ expected struct `syntax::symbol::InternedString`, found &str
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&str`

error[E0308]: mismatched types
   --> clippy_lints/src/utils/mod.rs:215:102
    |
215 |     path.segments.iter().rev().zip(segments.iter().rev()).all(|(a, b)| a.identifier.name.as_str() == *b)
    |                                                                                                      ^^ expected struct `syntax::symbol::InternedString`, found &str
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&str`

error[E0308]: mismatched types
   --> clippy_lints/src/utils/mod.rs:237:42
    |
237 |                 if item.name.as_str() == *segment {
    |                                          ^^^^^^^^ expected struct `syntax::symbol::InternedString`, found &str
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&str`

error[E0308]: mismatched types
   --> clippy_lints/src/utils/mod.rs:300:38
    |
300 |             if name.node.as_str() == *method_name {
    |                                      ^^^^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found &str
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&str`

error: no field `node` on type `&syntax::ast::Attribute`
   --> clippy_lints/src/utils/mod.rs:583:17
    |
583 |         if attr.node.is_sugared_doc {
    |                 ^^^^

error: no field `node` on type `&syntax::ast::Attribute`
   --> clippy_lints/src/utils/mod.rs:586:72
    |
586 |         if let ast::MetaItemKind::NameValue(ref key, ref value) = attr.node.value.node {
    |                                                                        ^^^^

error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
   --> clippy_lints/src/utils/mod.rs:586:16
    |
586 |         if let ast::MetaItemKind::NameValue(ref key, ref value) = attr.node.value.node {
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 field, found 2

error[E0308]: mismatched types
   --> clippy_lints/src/utils/mod.rs:589:58
    |
589 |                     if let Ok(value) = FromStr::from_str(s) {
    |                                                          ^ expected str, found struct `syntax::ast::Symbol`
    |
    = note: expected type `&str`
    = note:    found type `&syntax::ast::Symbol`

error[E0308]: mismatched types
   --> clippy_lints/src/utils/mod.rs:613:64
    |
613 |             Some((mac_name, new_span)) if mac_name.as_str() == name => return Some(new_span),
    |                                                                ^^^^ expected struct `syntax::symbol::InternedString`, found &str
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&str`

error[E0308]: mismatched types
   --> clippy_lints/src/utils/mod.rs:634:60
    |
634 |         Some((mac_name, new_span)) if mac_name.as_str() == name => Some(new_span),
    |                                                            ^^^^ expected struct `syntax::symbol::InternedString`, found &str
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&str`

error[E0308]: mismatched types
  --> clippy_lints/src/approx_const.rs:71:74
   |
71 |         LitKind::Float(ref s, FloatTy::F32) => check_known_consts(cx, e, s, "f32"),
   |                                                                          ^ expected str, found struct `syntax::ast::Symbol`
   |
   = note: expected type `&str`
   = note:    found type `&syntax::ast::Symbol`

error[E0308]: mismatched types
  --> clippy_lints/src/approx_const.rs:72:74
   |
72 |         LitKind::Float(ref s, FloatTy::F64) => check_known_consts(cx, e, s, "f64"),
   |                                                                          ^ expected str, found struct `syntax::ast::Symbol`
   |
   = note: expected type `&str`
   = note:    found type `&syntax::ast::Symbol`

error[E0308]: mismatched types
  --> clippy_lints/src/approx_const.rs:73:70
   |
73 |         LitKind::FloatUnsuffixed(ref s) => check_known_consts(cx, e, s, "f{32, 64}"),
   |                                                                      ^ expected str, found struct `syntax::ast::Symbol`
   |
   = note: expected type `&str`
   = note:    found type `&syntax::ast::Symbol`

error: no field `node` on type `&syntax::ast::Attribute`
  --> clippy_lints/src/attrs.rs:86:63
   |
86 |         if let MetaItemKind::List(ref name, ref items) = attr.node.value.node {
   |                                                               ^^^^

error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
  --> clippy_lints/src/attrs.rs:86:16
   |
86 |         if let MetaItemKind::List(ref name, ref items) = attr.node.value.node {
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 field, found 2

error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
  --> clippy_lints/src/attrs.rs:93:25
   |
91 |                 if_let_chain! {[
   |                 - in this macro invocation
92 |                     let NestedMetaItemKind::MetaItem(ref mi) = item.node,
93 |                     let MetaItemKind::NameValue(ref name, ref lit) = mi.node,
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 field, found 2

error: no field `node` on type `&syntax::ast::Attribute`
   --> clippy_lints/src/attrs.rs:110:79
    |
110 |                     if let MetaItemKind::List(ref name, ref lint_list) = attr.node.value.node {
    |                                                                               ^^^^

error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
   --> clippy_lints/src/attrs.rs:110:28
    |
110 |                     if let MetaItemKind::List(ref name, ref lint_list) = attr.node.value.node {
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 field, found 2

error: no field `node` on type `&syntax::ast::Attribute`
   --> clippy_lints/src/attrs.rs:213:66
    |
213 |         if let MetaItemKind::List(ref inline, ref values) = attr.node.value.node {
    |                                                                  ^^^^

error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
   --> clippy_lints/src/attrs.rs:213:16
    |
213 |         if let MetaItemKind::List(ref inline, ref values) = attr.node.value.node {
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 field, found 2

error[E0308]: mismatched types
   --> clippy_lints/src/attrs.rs:230:27
    |
230 |         if Version::parse(&*is).is_ok() {
    |                           ^^^^ expected str, found struct `syntax::ast::Symbol`
    |
    = note: expected type `&str`
    = note:    found type `&syntax::ast::Symbol`

error: no field `node` on type `&syntax::ast::Attribute`
  --> clippy_lints/src/doc.rs:96:17
   |
96 |         if attr.node.is_sugared_doc {
   |                 ^^^^

error: no field `node` on type `&syntax::ast::Attribute`
  --> clippy_lints/src/doc.rs:97:68
   |
97 |             if let ast::MetaItemKind::NameValue(_, ref doc) = attr.node.value.node {
   |                                                                    ^^^^

error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
  --> clippy_lints/src/doc.rs:97:20
   |
97 |             if let ast::MetaItemKind::NameValue(_, ref doc) = attr.node.value.node {
   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 field, found 2

error[E0308]: mismatched types
  --> clippy_lints/src/doc.rs:99:75
   |
99 |                     docs.extend_from_slice(&strip_doc_comment_decoration((doc, attr.span)));
   |                                                                           ^^^ expected str, found struct `syntax::ast::Symbol`
   |
   = note: expected type `&str`
   = note:    found type `&syntax::ast::Symbol`

error[E0308]: mismatched types
   --> clippy_lints/src/entry.rs:85:31
    |
82  |     if_let_chain! {[
    |     - in this macro invocation
...
85  |         name.node.as_str() == "contains_key",
    |                               ^^^^^^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/entry.rs:119:35
    |
116 |         if_let_chain! {[
    |         - in this macro invocation
...
119 |             name.node.as_str() == "insert",
    |                                   ^^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

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

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

error: the type of this value must be known in this context
   --> clippy_lints/src/enum_variants.rs:190:17
    |
190 |         assert!(last.is_some());
    |                 ^^^^^^^^^^^^^^

error: the type of this value must be known in this context
   --> clippy_lints/src/enum_variants.rs:200:31
    |
200 |                 if !mod_camel.is_empty() {
    |                               ^^^^^^^^

error[E0308]: mismatched types
  --> clippy_lints/src/format.rs:83:31
   |
77 |     if_let_chain! {[
   |     - in this macro invocation
...
83 |         decl.name.as_str() == "__STATIC_FMTSTR",
   |                               ^^^^^^^^^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
   |
   = note: expected type `syntax::symbol::InternedString`
   = note:    found type `&'static str`

error: type `syntax::ast::Symbol` cannot be dereferenced
  --> clippy_lints/src/format.rs:92:34
   |
77 |     if_let_chain! {[
   |     - in this macro invocation
...
92 |                     result.push(&**lit);
   |                                  ^^^^^

error[E0308]: mismatched types
  --> clippy_lints/src/len_zero.rs:93:31
   |
93 |         item.name.as_str() == name &&
   |                               ^^^^ expected struct `syntax::symbol::InternedString`, found &str
   |
   = note: expected type `syntax::symbol::InternedString`
   = note:    found type `&str`

error[E0308]: mismatched types
   --> clippy_lints/src/len_zero.rs:120:31
    |
120 |         item.name.as_str() == name &&
    |                               ^^^^ expected struct `syntax::symbol::InternedString`, found &str
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&str`

error[E0308]: mismatched types
   --> clippy_lints/src/len_zero.rs:160:29
    |
160 |         if name.as_str() == "is_empty" {
    |                             ^^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/len_zero.rs:175:29
    |
175 |         if name.as_str() == "len" && args.len() == 1 && has_is_empty(cx, &args[0]) {
    |                             ^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/len_zero.rs:190:38
    |
190 |             if item.name.as_str() == "is_empty" {
    |                                      ^^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/lifetimes.rs:199:32
    |
199 |         if lt.name.as_str() != "'static" {
    |                                ^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/lifetimes.rs:228:36
    |
228 |             if lt.name.as_str() == "'static" {
    |                                    ^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/loops.rs:373:53
    |
373 |                     if method_name.node.as_str() == "next" &&
    |                                                     ^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/loops.rs:375:57
    |
375 |                        lhs_constructor.name.as_str() == "Some" &&
    |                                                         ^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/loops.rs:398:63
    |
398 |                 if args.len() == 1 && method.node.as_str() == "collect" &&
    |                                                               ^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/loops.rs:512:33
    |
509 |     if_let_chain! {[
    |     - in this macro invocation
...
512 |         method.node.as_str() == "len",
    |                                 ^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/loops.rs:583:40
    |
583 |             if method_name.as_str() == "iter" || method_name.as_str() == "iter_mut" {
    |                                        ^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/loops.rs:583:74
    |
583 |             if method_name.as_str() == "iter" || method_name.as_str() == "iter_mut" {
    |                                                                          ^^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/loops.rs:590:67
    |
590 |                                        if method_name.as_str() == "iter_mut" {
    |                                                                   ^^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/loops.rs:599:47
    |
599 |             } else if method_name.as_str() == "into_iter" && match_trait_method(cx, arg, &paths::INTO_ITERATOR) {
    |                                               ^^^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/loops.rs:609:47
    |
609 |             } else if method_name.as_str() == "next" && match_trait_method(cx, arg, &paths::ITERATOR) {
    |                                               ^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
  --> clippy_lints/src/map_clone.rs:31:38
   |
31 |             if name.node.as_str() == "map" && args.len() == 2 {
   |                                      ^^^^^ expected struct `syntax::symbol::InternedString`, found reference
   |
   = note: expected type `syntax::symbol::InternedString`
   = note:    found type `&'static str`

error[E0308]: mismatched types
  --> clippy_lints/src/map_clone.rs:54:64
   |
35 |                         if_let_chain! {[
   |                         - in this macro invocation
...
54 |                                 if clone_call.node.as_str() == "clone" &&
   |                                                                ^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
   |
   = note: expected type `syntax::symbol::InternedString`
   = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/methods.rs:608:61
    |
608 |                 if args.len() == 1 && name.node.as_str() == "clone" {
    |                                                             ^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/methods.rs:615:54
    |
615 |                             if name.node.as_str() == method && args.len() > pos {
    |                                                      ^^^^^^ expected struct `syntax::symbol::InternedString`, found &str
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&str`

error[E0308]: mismatched types
   --> clippy_lints/src/methods.rs:646:37
    |
639 |         if_let_chain! {[
    |         - in this macro invocation
...
646 |                 if name.as_str() == method_name &&
    |                                     ^^^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found &str
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&str`

error[E0277]: the trait bound `syntax::symbol::InternedString: core::cmp::PartialEq<&str>` is not satisfied
   --> clippy_lints/src/methods.rs:684:16
    |
639 |         if_let_chain! {[
    |         - in this macro invocation
...
684 |             if &name.as_str() == &"new" &&
    |                ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `core::cmp::PartialEq<&str>` is not implemented for `syntax::symbol::InternedString`
    |
    = help: the following implementations were found:
    = help:   <syntax::symbol::InternedString as core::cmp::PartialEq>
    = note: required because of the requirements on the impl of `core::cmp::PartialEq<&&str>` for `&syntax::symbol::InternedString`

error[E0277]: the trait bound `syntax::symbol::InternedString: core::cmp::PartialEq<&str>` is not satisfied
   --> clippy_lints/src/methods.rs:982:12
    |
982 |         if &name.node.as_str() == &"iter" && may_slice(cx, cx.tcx.tables().expr_ty(&args[0])) {
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `core::cmp::PartialEq<&str>` is not implemented for `syntax::symbol::InternedString`
    |
    = help: the following implementations were found:
    = help:   <syntax::symbol::InternedString as core::cmp::PartialEq>
    = note: required because of the requirements on the impl of `core::cmp::PartialEq<&&str>` for `&syntax::symbol::InternedString`

error[E0308]: mismatched types
    --> clippy_lints/src/methods.rs:1212:71
     |
1207 |     if_let_chain! {[
     |     - in this macro invocation
...
1212 |         path.segments.len() == 1 && path.segments[0].name.as_str() == "Some"
     |                                                                       ^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
     |
     = note: expected type `syntax::symbol::InternedString`
     = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/misc.rs:239:32
    |
239 |                     if name == "eq" || name == "ne" || name == "is_nan" || name.starts_with("eq_") ||
    |                                ^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/misc.rs:239:48
    |
239 |                     if name == "eq" || name == "ne" || name == "is_nan" || name.starts_with("eq_") ||
    |                                                ^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/misc.rs:239:64
    |
239 |                     if name == "eq" || name == "ne" || name == "is_nan" || name.starts_with("eq_") ||
    |                                                                ^^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/misc.rs:274:32
    |
274 |                     binding != "_result" && // FIXME: #944
    |                                ^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/misc.rs:318:33
    |
318 |         if seg.name.as_str() == "NAN" {
    |                                 ^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/misc.rs:362:33
    |
362 |             if name.as_str() == "to_string" || name.as_str() == "to_owned" && is_str_arg(cx, args) {
    |                                 ^^^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/misc.rs:362:65
    |
362 |             if name.as_str() == "to_string" || name.as_str() == "to_owned" && is_str_arg(cx, args) {
    |                                                                 ^^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/new_without_default.rs:103:59
    |
103 |             if decl.inputs.is_empty() && name.as_str() == "new" && cx.access_levels.is_reachable(id) {
    |                                                           ^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error: the type of this value must be known in this context
   --> clippy_lints/src/non_expressive_names.rs:170:31
    |
170 |                 let first_e = existing_chars.next().expect("we know we have at least one char");
    |                               ^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
  --> clippy_lints/src/open_options.rs:39:38
   |
39 |             if name.node.as_str() == "open" && match_type(cx, obj_ty, &paths::OPEN_OPTIONS) {
   |                                      ^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
   |
   = note: expected type `syntax::symbol::InternedString`
   = note:    found type `&'static str`

error: no method named `find` found for type `&syntax::ast::Symbol` in the current scope
  --> clippy_lints/src/panic.rs:48:36
   |
37 |         if_let_chain! {[
   |         - in this macro invocation
...
48 |             let Some(par) = string.find('{'),
   |                                    ^^^^

error: cannot index a value of type `&syntax::ast::Symbol`
  --> clippy_lints/src/panic.rs:49:13
   |
37 |         if_let_chain! {[
   |         - in this macro invocation
...
49 |             string[par..].contains('}')
   |             ^^^^^^^^^^^^^

error[E0308]: mismatched types
  --> clippy_lints/src/ranges.rs:53:33
   |
53 |             if name.as_str() == "step_by" && args.len() == 2 && has_step_by(cx, &args[0]) &&
   |                                 ^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
   |
   = note: expected type `syntax::symbol::InternedString`
   = note:    found type `&'static str`

error[E0308]: mismatched types
  --> clippy_lints/src/ranges.rs:60:40
   |
60 |             } else if name.as_str() == "zip" && args.len() == 2 {
   |                                        ^^^^^ expected struct `syntax::symbol::InternedString`, found reference
   |
   = note: expected type `syntax::symbol::InternedString`
   = note:    found type `&'static str`

error[E0308]: mismatched types
  --> clippy_lints/src/ranges.rs:66:43
   |
63 |                 if_let_chain! {[
   |                 - in this macro invocation
...
66 |                     iter_name.as_str() == "iter",
   |                                           ^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
   |
   = note: expected type `syntax::symbol::InternedString`
   = note:    found type `&'static str`

error[E0308]: mismatched types
  --> clippy_lints/src/ranges.rs:72:42
   |
63 |                 if_let_chain! {[
   |                 - in this macro invocation
...
72 |                     len_name.as_str() == "len" && len_args.len() == 1,
   |                                          ^^^^^ expected struct `syntax::symbol::InternedString`, found reference
   |
   = note: expected type `syntax::symbol::InternedString`
   = note:    found type `&'static str`

error[E0308]: mismatched types
   --> clippy_lints/src/regex.rs:206:33
    |
206 |             match builder.parse(r) {
    |                                 ^ expected str, found struct `syntax::ast::Symbol`
    |
    = note: expected type `&str`
    = note:    found type `&syntax::ast::Symbol`

error[E0308]: mismatched types
   --> clippy_lints/src/regex.rs:219:51
    |
219 |                               str_span(expr.span, r, e.position()),
    |                                                   ^ expected str, found struct `syntax::ast::Symbol`
    |
    = note: expected type `&str`
    = note:    found type `&syntax::ast::Symbol`

error: no field `node` on type `&syntax::ast::Attribute`
   --> clippy_lints/src/returns.rs:149:55
    |
149 |     if let ast::MetaItemKind::List(ref key, _) = attr.node.value.node {
    |                                                       ^^^^

error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
   --> clippy_lints/src/returns.rs:149:12
    |
149 |     if let ast::MetaItemKind::List(ref key, _) = attr.node.value.node {
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 field, found 2

error[E0308]: mismatched types
   --> clippy_lints/src/strings.rs:146:38
    |
146 |             if name.node.as_str() == "as_bytes" {
    |                                      ^^^^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error: no method named `chars` found for type `&syntax::ast::Symbol` in the current scope
   --> clippy_lints/src/strings.rs:149:40
    |
149 |                         if lit_content.chars().all(|c| c.is_ascii()) && !in_macro(cx, args[0].span) {
    |                                        ^^^^^

error: aborting due to 85 previous errors

error: Could not compile `clippy_lints`.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions