clippy_lints 0.0.153

A bunch of helpful lints to avoid common pitfalls in Rust

Build #68235 2017-08-21 07:48:16

Build failed. If you want to re-trigger a documentation build, you can do it here. You can find more information on docs.rs builds documentation on the builds page.

# rustc version rustc 1.20.0-dev (64484707f 2017-07-10)

# docs.rs version cratesfyi 0.4.1 (003e49d 2017-06-08)

# build log Updating registry `https://github.com/rust-lang/crates.io-index` Downloading clippy_lints v0.0.153 Fresh matches v0.1.6 Fresh either v1.1.0 Fresh lazy_static v0.2.8 Fresh quote v0.3.15 Fresh semver-parser v0.7.0 Fresh quine-mc_cluskey v0.2.4 Fresh serde v1.0.11 Fresh bitflags v0.9.1 Fresh unicode-xid v0.0.4 Compiling itertools v0.6.1 Fresh regex-syntax v0.4.1 Fresh getopts v0.2.14 Fresh toml v0.4.5 Fresh unicode-normalization v0.1.5 Fresh synom v0.11.3 Fresh semver v0.6.0 Running `rustc --crate-name itertools .cargo/registry/src/github.com-1ecc6299db9ec823/itertools-0.6.1/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=86e98dc5b478f997 -C extra-filename=-86e98dc5b478f997 --out-dir /home/cratesfyi/cratesfyi/debug/deps -L dependency=/home/cratesfyi/cratesfyi/debug/deps --extern either=/home/cratesfyi/cratesfyi/debug/deps/libeither-6fd041d6276155b5.rlib --extern-version either=either,1.1.0 --cap-lints allow` Fresh syn v0.11.11 Fresh serde_derive_internals v0.15.1 Fresh serde_derive v1.0.11 Fresh pulldown-cmark v0.0.15 Documenting clippy_lints v0.0.153 Running `rustdoc --crate-name clippy_lints .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/lib.rs -o /home/cratesfyi/cratesfyi/doc -L dependency=/home/cratesfyi/cratesfyi/debug/deps --extern regex_syntax=/home/cratesfyi/cratesfyi/debug/deps/libregex_syntax-0240ebb185fe3635.rlib --extern-version regex_syntax=regex-syntax,0.4.1 --extern matches=/home/cratesfyi/cratesfyi/debug/deps/libmatches-e2a43ce3f52b9dcc.rlib --extern-version matches=matches,0.1.6 --extern unicode_normalization=/home/cratesfyi/cratesfyi/debug/deps/libunicode_normalization-5554c8b28de87bfc.rlib --extern-version unicode_normalization=unicode-normalization,0.1.5 --extern semver=/home/cratesfyi/cratesfyi/debug/deps/libsemver-70b59fcc83de19e2.rlib --extern-version semver=semver,0.6.0 --extern quine_mc_cluskey=/home/cratesfyi/cratesfyi/debug/deps/libquine_mc_cluskey-6d8f73fdf7c11d33.rlib --extern-version quine_mc_cluskey=quine-mc_cluskey,0.2.4 --extern itertools=/home/cratesfyi/cratesfyi/debug/deps/libitertools-86e98dc5b478f997.rlib --extern-version itertools=itertools,0.6.1 --extern pulldown_cmark=/home/cratesfyi/cratesfyi/debug/deps/libpulldown_cmark-51e76190cc33fac5.rlib --extern-version pulldown_cmark=pulldown-cmark,0.0.15 --extern serde=/home/cratesfyi/cratesfyi/debug/deps/libserde-c7201ac4f95f293e.rlib --extern-version serde=serde,1.0.11 --extern serde_derive=/home/cratesfyi/cratesfyi/debug/deps/libserde_derive-27ac43668445212f.so --extern-version serde_derive=serde_derive,1.0.11 --extern lazy_static=/home/cratesfyi/cratesfyi/debug/deps/liblazy_static-18005fa1be5dd889.rlib --extern-version lazy_static=lazy_static,0.2.8 --extern toml=/home/cratesfyi/cratesfyi/debug/deps/libtoml-43a73e8f4c70aac5.rlib --extern-version toml=toml,0.4.5` error[E0432]: unresolved import `syntax::codemap::CompilerDesugaringKind` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/utils/mod.rs:19:23 | 19 | use syntax::codemap::{CompilerDesugaringKind, ExpnFormat, ExpnInfo, Span, DUMMY_SP}; | ^^^^^^^^^^^^^^^^^^^^^^ no `CompilerDesugaringKind` in `codemap`. Did you mean to use `CompilerDesugaring`? error[E0432]: unresolved import `rustc::hir::BindingAnnotation` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/let_if_seq.rs:3:5 | 3 | use rustc::hir::BindingAnnotation; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `BindingAnnotation` in `hir` error[E0432]: unresolved import `rustc::hir::BindingAnnotation` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/needless_borrow.rs:6:64 | 6 | use rustc::hir::{ExprAddrOf, Expr, MutImmutable, Pat, PatKind, BindingAnnotation}; | ^^^^^^^^^^^^^^^^^ no `BindingAnnotation` in `hir` error[E0432]: unresolved import `rustc::hir::BindingAnnotation` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/needless_borrowed_ref.rs:6:46 | 6 | use rustc::hir::{MutImmutable, Pat, PatKind, BindingAnnotation}; | ^^^^^^^^^^^^^^^^^ no `BindingAnnotation` in `hir` error[E0433]: failed to resolve. Use of undeclared type or module `BindingAnnotation` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/matches.rs:254:26 | 254 | PatKind::Binding(BindingAnnotation::Unannotated, _, ident, None) => ident.node.to_string(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use of undeclared type or module `BindingAnnotation` error[E0433]: failed to resolve. Use of undeclared type or module `BindingAnnotation` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/misc.rs:238:34 | 238 | PatKind::Binding(BindingAnnotation::Ref, _, _, _) | | ^^^^^^^^^^^^^^^^^^^^^^ Use of undeclared type or module `BindingAnnotation` error[E0433]: failed to resolve. Use of undeclared type or module `BindingAnnotation` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/misc.rs:239:34 | 239 | PatKind::Binding(BindingAnnotation::RefMut, _, _, _) => { | ^^^^^^^^^^^^^^^^^^^^^^^^^ Use of undeclared type or module `BindingAnnotation` error[E0433]: failed to resolve. Use of undeclared type or module `BindingAnnotation` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/misc.rs:260:22 | 260 | if an == BindingAnnotation::Ref || an == BindingAnnotation::RefMut { | ^^^^^^^^^^^^^^^^^^^^^^ Use of undeclared type or module `BindingAnnotation` error[E0433]: failed to resolve. Use of undeclared type or module `BindingAnnotation` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/misc.rs:260:54 | 260 | if an == BindingAnnotation::Ref || an == BindingAnnotation::RefMut { | ^^^^^^^^^^^^^^^^^^^^^^^^^ Use of undeclared type or module `BindingAnnotation` error[E0433]: failed to resolve. Use of undeclared type or module `BindingAnnotation` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/misc.rs:262:49 | 262 | let (mutopt,initref) = if an == BindingAnnotation::RefMut { | ^^^^^^^^^^^^^^^^^^^^^^^^^ Use of undeclared type or module `BindingAnnotation` error[E0574]: expected struct, variant or union type, found enum `ConstFloat` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/misc.rs:431:28 | 431 | let zero = ConstFloat { | ^^^^^^^^^^ not a struct, variant or union type error[E0574]: expected struct, variant or union type, found enum `ConstFloat` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/misc.rs:436:32 | 436 | let infinity = ConstFloat { | ^^^^^^^^^^ not a struct, variant or union type error[E0574]: expected struct, variant or union type, found enum `ConstFloat` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/misc.rs:441:36 | 441 | let neg_infinity = ConstFloat { | ^^^^^^^^^^ not a struct, variant or union type error[E0574]: expected struct, variant or union type, found enum `ConstFloat` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/misc.rs:450:28 | 450 | let zero = ConstFloat { | ^^^^^^^^^^ not a struct, variant or union type error[E0574]: expected struct, variant or union type, found enum `ConstFloat` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/misc.rs:455:32 | 455 | let infinity = ConstFloat { | ^^^^^^^^^^ not a struct, variant or union type error[E0574]: expected struct, variant or union type, found enum `ConstFloat` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/misc.rs:460:36 | 460 | let neg_infinity = ConstFloat { | ^^^^^^^^^^ not a struct, variant or union type error[E0433]: failed to resolve. Use of undeclared type or module `BindingAnnotation` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/needless_pass_by_value.rs:138:28 | 138 | if mode == BindingAnnotation::Mutable || mode == BindingAnnotation::RefMut { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ Use of undeclared type or module `BindingAnnotation` error[E0433]: failed to resolve. Use of undeclared type or module `BindingAnnotation` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/needless_pass_by_value.rs:138:66 | 138 | if mode == BindingAnnotation::Mutable || mode == BindingAnnotation::RefMut { | ^^^^^^^^^^^^^^^^^^^^^^^^^ Use of undeclared type or module `BindingAnnotation` error[E0609]: no field `hir_id` on type `&rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/consts.rs:252:61 | 252 | ExprPath(ref qpath) => self.fetch_path(qpath, e.hir_id), | ^^^^^^ error[E0308]: mismatched types --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/consts.rs:288:48 | 288 | let def = self.tables.qpath_def(qpath, id); | ^^ expected struct `syntax::ast::NodeId`, found struct `rustc::hir::HirId` | = note: expected type `syntax::ast::NodeId` found type `rustc::hir::HirId` error[E0308]: mismatched types --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/consts.rs:292:54 | 292 | let substs = self.tables.node_substs(id); | ^^ expected struct `syntax::ast::NodeId`, found struct `rustc::hir::HirId` | = note: expected type `syntax::ast::NodeId` found type `rustc::hir::HirId` error[E0277]: the trait bound `rustc::hir::def_id::DefId: rustc::ty::TypeFoldable<'_>` is not satisfied --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/consts.rs:298:48 | 298 | let param_env = self.param_env.and((def_id, substs)); | ^^^ the trait `rustc::ty::TypeFoldable<'_>` is not implemented for `rustc::hir::def_id::DefId` | = note: required because of the requirements on the impl of `rustc::ty::TypeFoldable<'_>` for `(rustc::hir::def_id::DefId, &rustc::ty::Slice<rustc::ty::subst::Kind<'_>>)` error[E0061]: this function takes 3 parameters but 2 parameters were supplied --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/consts.rs:299:68 | 299 | if let Some((def_id, substs)) = lookup_const_by_id(self.tcx, param_env) { | ^^^^^^^^^^^^^^^^^^^ expected 3 parameters error[E0599]: no method named `type_dependent_defs` found for type `&rustc::ty::TypeckTables<'_>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/utils/mod.rs:199:33 | 199 | let method_call = cx.tables.type_dependent_defs()[expr.hir_id]; | ^^^^^^^^^^^^^^^^^^^ field, not a method | = help: did you mean to write `cx.tables.type_dependent_defs` instead of `cx.tables.type_dependent_defs(...)`? error[E0609]: no field `hir_id` on type `&rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/utils/mod.rs:199:60 | 199 | let method_call = cx.tables.type_dependent_defs()[expr.hir_id]; | ^^^^^^ error[E0599]: no method named `type_dependent_defs` found for type `&rustc::ty::TypeckTables<'_>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/utils/mod.rs:210:33 | 210 | let method_call = cx.tables.type_dependent_defs()[expr.hir_id]; | ^^^^^^^^^^^^^^^^^^^ field, not a method | = help: did you mean to write `cx.tables.type_dependent_defs` instead of `cx.tables.type_dependent_defs(...)`? error[E0609]: no field `hir_id` on type `&rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/utils/mod.rs:210:60 | 210 | let method_call = cx.tables.type_dependent_defs()[expr.hir_id]; | ^^^^^^ error[E0308]: mismatched types --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/utils/mod.rs:352:32 | 352 | cx.tables.qpath_def(qpath, id) | ^^ expected struct `syntax::ast::NodeId`, found struct `rustc::hir::HirId` | = note: expected type `syntax::ast::NodeId` found type `rustc::hir::HirId` error[E0560]: struct `rustc_errors::CodeSuggestion` has no field named `show_code_when_inline` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/utils/mod.rs:622:9 | 622 | show_code_when_inline: true, | ^^^^^^^^^^^^^^^^^^^^^^ `rustc_errors::CodeSuggestion` does not have this field error[E0599]: no method named `adjustments` found for type `&rustc::ty::TypeckTables<'_>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/utils/mod.rs:659:15 | 659 | cx.tables.adjustments().get(e.hir_id).is_some() | ^^^^^^^^^^^ field, not a method | = help: did you mean to write `cx.tables.adjustments` instead of `cx.tables.adjustments(...)`? error[E0609]: no field `hir_id` on type `&rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/utils/mod.rs:659:35 | 659 | cx.tables.adjustments().get(e.hir_id).is_some() | ^^^^^^ error[E0609]: no field `hir_id` on type `&rustc::hir::Pat` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/utils/mod.rs:854:68 | 854 | PatKind::Path(ref qpath) => is_enum_variant(cx, qpath, pat.hir_id), | ^^^^^^ error[E0609]: no field `hir_id` on type `&rustc::hir::Pat` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/utils/mod.rs:857:47 | 857 | if is_enum_variant(cx, qpath, pat.hir_id) { | ^^^^^^ error[E0609]: no field `hir_id` on type `&rustc::hir::Pat` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/utils/mod.rs:864:47 | 864 | if is_enum_variant(cx, qpath, pat.hir_id) { | ^^^^^^ error[E0308]: mismatched types --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/utils/mod.rs:838:40 | 838 | cx.tables.qpath_def(qpath, id), | ^^ expected struct `syntax::ast::NodeId`, found struct `rustc::hir::HirId` | = note: expected type `syntax::ast::NodeId` found type `rustc::hir::HirId` error[E0599]: no method named `lint_level_at_node` found for type `rustc::ty::TyCtxt<'_, '_, '_>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/utils/mod.rs:1011:12 | 1011 | cx.tcx.lint_level_at_node(lint, id).0 == Level::Allow | ^^^^^^^^^^^^^^^^^^ error[E0609]: no field `hir_id` on type `&syntax::ptr::P<rustc::hir::Local>` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/utils/inspector.rs:148:83 | 148 | println!("local variable of type {}", cx.tables.node_id_to_type(local.hir_id)); | ^^^^^^ error[E0599]: no method named `adjustments` found for type `&rustc::ty::TypeckTables<'_>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/utils/inspector.rs:164:52 | 164 | println!("{}adjustments: {:?}", ind, cx.tables.adjustments().get(expr.hir_id)); | ^^^^^^^^^^^ field, not a method | = help: did you mean to write `cx.tables.adjustments` instead of `cx.tables.adjustments(...)`? error[E0609]: no field `hir_id` on type `&rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/utils/inspector.rs:164:75 | 164 | println!("{}adjustments: {:?}", ind, cx.tables.adjustments().get(expr.hir_id)); | ^^^^^^ error[E0609]: no field `hir_id` on type `&syntax::ptr::P<rustc::hir::Expr>` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/utils/higher.rs:185:50 | 185 | let fun_def = resolve_node(cx, path, fun.hir_id); | ^^^^^^ error[E0599]: no function or associated item named `new` found for type `rustc_const_eval::ConstContext<'_, '_>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/array_indexing.rs:71:31 | 71 | let constcx = ConstContext::new(cx.tcx, cx.param_env.and(substs), cx.tables); | ^^^^^^^^^^^^^^^^^ error[E0609]: no field `hir_id` on type `&syntax::ptr::P<rustc::hir::Expr>` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/attrs.rs:218:64 | 218 | let fun_id = tables.qpath_def(qpath, path_expr.hir_id).def_id(); | ^^^^^^ error[E0609]: no field `hir_id` on type `&rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/bit_mask.rs:321:54 | 321 | let def = cx.tables.qpath_def(qpath, lit.hir_id); | ^^^^^^ error[E0061]: this function takes 3 parameters but 2 parameters were supplied --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/bit_mask.rs:323:36 | 323 | lookup_const_by_id(cx.tcx, cx.param_env.and((def_id, Substs::empty()))).and_then(|(l, _ty)| { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 3 parameters error[E0277]: the trait bound `rustc::hir::def_id::DefId: rustc::ty::TypeFoldable<'_>` is not satisfied --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/bit_mask.rs:323:57 | 323 | lookup_const_by_id(cx.tcx, cx.param_env.and((def_id, Substs::empty()))).and_then(|(l, _ty)| { | ^^^ the trait `rustc::ty::TypeFoldable<'_>` is not implemented for `rustc::hir::def_id::DefId` | = note: required because of the requirements on the impl of `rustc::ty::TypeFoldable<'_>` for `(rustc::hir::def_id::DefId, &rustc::ty::Slice<rustc::ty::subst::Kind<'_>>)` error[E0560]: struct `rustc::hir::Expr` has no field named `hir_id` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/booleans.rs:125:29 | 125 | hir_id: DUMMY_HIR_ID, | ^^^^^^^ `rustc::hir::Expr` does not have this field error[E0599]: no method named `node_types` found for type `&'a rustc::ty::TypeckTables<'tcx>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/booleans.rs:415:35 | 415 | if self.cx.tables.node_types()[inner.hir_id].is_bool() { | ^^^^^^^^^^ field, not a method | = help: did you mean to write `self.cx.tables.node_types` instead of `self.cx.tables.node_types(...)`? error[E0609]: no field `hir_id` on type `&syntax::ptr::P<rustc::hir::Expr>` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/booleans.rs:415:54 | 415 | if self.cx.tables.node_types()[inner.hir_id].is_bool() { | ^^^^^^ error[E0609]: no field `hir_id` on type `&rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/cyclomatic_complexity.rs:74:53 | 74 | let ret_ty = cx.tables.node_id_to_type(expr.hir_id); | ^^^^^^ error[E0609]: no field `hir_id` on type `&syntax::ptr::P<rustc::hir::Expr>` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/cyclomatic_complexity.rs:163:64 | 163 | let ty = self.cx.tables.node_id_to_type(callee.hir_id); | ^^^^^^ error[E0599]: no method named `for_each_relevant_impl` found for type `rustc::ty::TyCtxt<'a, 'tcx, 'tcx>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/derive.rs:99:16 | 99 | cx.tcx.for_each_relevant_impl(peq_trait_def_id, ty, |impl_id| { | ^^^^^^^^^^^^^^^^^^^^^^ error[E0609]: no field `hir_id` on type `&syntax::ptr::P<rustc::hir::Expr>` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/drop_forget_ref.rs:123:58 | 123 | let def_id = cx.tables.qpath_def(qpath, path.hir_id).def_id(); | ^^^^^^ error[E0277]: the trait bound `rustc::hir::def_id::DefId: rustc::ty::TypeFoldable<'_>` is not satisfied --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/enum_clike.rs:55:35 | 55 | param_env.and((did, substs)), | ^^^ the trait `rustc::ty::TypeFoldable<'_>` is not implemented for `rustc::hir::def_id::DefId` | = note: required because of the requirements on the impl of `rustc::ty::TypeFoldable<'_>` for `(rustc::hir::def_id::DefId, &rustc::ty::Slice<rustc::ty::subst::Kind<'_>>)` error[E0308]: mismatched types --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/enum_clike.rs:55:25 | 55 | param_env.and((did, substs)), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected tuple, found struct `rustc::ty::ParamEnvAnd` | = note: expected type `(rustc::hir::def_id::DefId, &rustc::ty::Slice<rustc::ty::subst::Kind<'_>>)` found type `rustc::ty::ParamEnvAnd<'_, (rustc::hir::def_id::DefId, &rustc::ty::Slice<rustc::ty::subst::Kind<'_>>)>` error[E0609]: no field `hir_id` on type `&syntax::ptr::P<rustc::hir::Expr>` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/eval_order_dependence.rs:70:70 | 70 | let var = cx.tables.qpath_def(qpath, lhs.hir_id).def_id(); | ^^^^^^ error[E0609]: no field `hir_id` on type `&'tcx rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/eval_order_dependence.rs:307:89 | 307 | if path.segments.len() == 1 && self.cx.tables.qpath_def(qpath, expr.hir_id).def_id() == self.var { | ^^^^^^ error[E0609]: no field `hir_id` on type `&syntax::ptr::P<rustc::hir::Expr>` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/format.rs:50:76 | 50 | match_def_path(cx.tcx, resolve_node(cx, qpath, fun.hir_id).def_id(), &paths::FMT_ARGUMENTS_NEWV1), | ^^^^^^ error[E0609]: no field `hir_id` on type `rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/format.rs:133:64 | 133 | match_def_path(cx.tcx, resolve_node(cx, qpath, args[1].hir_id).def_id(), &paths::DISPLAY_FMT_METHOD), | ^^^^^^ did you mean `id`? error[E0599]: no method named `type_dependent_defs` found for type `&'a rustc::ty::TypeckTables<'tcx>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/functions.rs:190:45 | 190 | let def_id = self.cx.tables.type_dependent_defs()[expr.hir_id].def_id(); | ^^^^^^^^^^^^^^^^^^^ field, not a method | = help: did you mean to write `self.cx.tables.type_dependent_defs` instead of `self.cx.tables.type_dependent_defs(...)`? error[E0609]: no field `hir_id` on type `&'tcx rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/functions.rs:190:72 | 190 | let def_id = self.cx.tables.type_dependent_defs()[expr.hir_id].def_id(); | ^^^^^^ error[E0609]: no field `hir_id` on type `&rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/functions.rs:213:59 | 213 | let def = self.cx.tables.qpath_def(qpath, ptr.hir_id); | ^^^^^^ error[E0609]: no field `hir_id` on type `&'tcx rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/let_if_seq.rs:142:61 | 142 | self.id == self.cx.tables.qpath_def(qpath, expr.hir_id).def_id(), | ^^^^^^ error[E0609]: no field `hir_id` on type `&syntax::ptr::P<rustc::hir::Expr>` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/let_if_seq.rs:165:48 | 165 | decl == cx.tables.qpath_def(qpath, var.hir_id).def_id(), | ^^^^^^ error[E0599]: no method named `node_to_hir_id` found for type `rustc::hir::map::Map<'_>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/lifetimes.rs:287:46 | 287 | let hir_id = self.cx.tcx.hir.node_to_hir_id(ty.id); | ^^^^^^^^^^^^^^ error[E0599]: no function or associated item named `new` found for type `rustc_const_eval::ConstContext<'_, '_>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/loops.rs:723:23 | 723 | let constcx = ConstContext::new(cx.tcx, cx.param_env.and(substs), cx.tables); | ^^^^^^^^^^^^^^^^^ error[E0599]: no method named `type_dependent_defs` found for type `&rustc::ty::TypeckTables<'_>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/loops.rs:804:40 | 804 | let def_id = cx.tables.type_dependent_defs()[arg.hir_id].def_id(); | ^^^^^^^^^^^^^^^^^^^ field, not a method | = help: did you mean to write `cx.tables.type_dependent_defs` instead of `cx.tables.type_dependent_defs(...)`? error[E0609]: no field `hir_id` on type `&rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/loops.rs:804:66 | 804 | let def_id = cx.tables.type_dependent_defs()[arg.hir_id].def_id(); | ^^^^^^ error[E0609]: no field `hir_id` on type `&rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/loops.rs:805:56 | 805 | let substs = cx.tables.node_substs(arg.hir_id); | ^^^^^^ error[E0609]: no field `hir_id` on type `&'tcx rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/loops.rs:1056:50 | 1056 | self.cx.tables.qpath_def(qpath, expr.hir_id).def_id() == self.var, | ^^^^^^ error[E0609]: no field `hir_id` on type `&syntax::ptr::P<rustc::hir::Expr>` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/loops.rs:1062:65 | 1062 | let def = self.cx.tables.qpath_def(seqpath, seqexpr.hir_id); | ^^^^^^ error[E0609]: no field `hir_id` on type `&'tcx rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/loops.rs:1088:53 | 1088 | if self.cx.tables.qpath_def(qpath, expr.hir_id).def_id() == self.var { | ^^^^^^ error[E0609]: no field `hir_id` on type `&rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/loops.rs:1379:56 | 1379 | let path_res = cx.tables.qpath_def(qpath, expr.hir_id); | ^^^^^^ error[E0599]: no function or associated item named `new` found for type `rustc_const_eval::ConstContext<'_, '_>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/matches.rs:421:19 | 421 | let constcx = ConstContext::new(cx.tcx, cx.param_env.and(substs), cx.tables); | ^^^^^^^^^^^^^^^^^ error[E0609]: no field `hir_id` on type `&syntax::ptr::P<rustc::hir::Expr>` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/mem_forget.rs:35:67 | 35 | let def_id = cx.tables.qpath_def(qpath, path_expr.hir_id).def_id(); | ^^^^^^ error[E0609]: no field `hir_id` on type `&syntax::ptr::P<rustc::hir::Expr>` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/methods.rs:901:62 | 901 | let Def::Method(did) = cx.tables.qpath_def(path, fun.hir_id), | ^^^^^^ error[E0599]: no function or associated item named `new` found for type `rustc_const_eval::ConstContext<'_, '_>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/methods.rs:1282:35 | 1282 | if let Ok(ConstVal::Str(r)) = ConstContext::new(cx.tcx, cx.param_env.and(substs), cx.tables).eval(arg) { | ^^^^^^^^^^^^^^^^^ error[E0609]: no field `hir_id` on type `&syntax::ptr::P<rustc::hir::Expr>` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/minmax.rs:65:58 | 65 | let def_id = cx.tables.qpath_def(qpath, path.hir_id).def_id(); | ^^^^^^ error[E0609]: no field `hir_id` on type `&'tcx rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/misc.rs:364:74 | 364 | non_macro_local(cx, &cx.tables.qpath_def(qpath, expr.hir_id)) | ^^^^^^ error[E0599]: no function or associated item named `new` found for type `rustc_const_eval::ConstContext<'_, '_>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/misc.rs:426:15 | 426 | let res = ConstContext::new(cx.tcx, cx.param_env.and(substs), cx.tables).eval(expr); | ^^^^^^^^^^^^^^^^^ error[E0609]: no field `ty` on type `rustc_const_math::ConstFloat` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/misc.rs:429:19 | 429 | match val.ty { | ^^ error: use of unstable library feature 'float_bits_conv': recently added (see issue #40470) --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/misc.rs:433:35 | 433 | bits: 0.0_f32.to_bits() as u128, | ^^^^^^^ | = help: add #![feature(float_bits_conv)] to the crate attributes to enable error: use of unstable library feature 'float_bits_conv': recently added (see issue #40470) --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/misc.rs:438:48 | 438 | bits: ::std::f32::INFINITY.to_bits() as u128, | ^^^^^^^ | = help: add #![feature(float_bits_conv)] to the crate attributes to enable error: use of unstable library feature 'float_bits_conv': recently added (see issue #40470) --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/misc.rs:443:52 | 443 | bits: ::std::f32::NEG_INFINITY.to_bits() as u128, | ^^^^^^^ | = help: add #![feature(float_bits_conv)] to the crate attributes to enable error: use of unstable library feature 'float_bits_conv': recently added (see issue #40470) --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/misc.rs:452:35 | 452 | bits: 0.0_f64.to_bits() as u128, | ^^^^^^^ | = help: add #![feature(float_bits_conv)] to the crate attributes to enable error: use of unstable library feature 'float_bits_conv': recently added (see issue #40470) --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/misc.rs:457:48 | 457 | bits: ::std::f64::INFINITY.to_bits() as u128, | ^^^^^^^ | = help: add #![feature(float_bits_conv)] to the crate attributes to enable error: use of unstable library feature 'float_bits_conv': recently added (see issue #40470) --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/misc.rs:462:52 | 462 | bits: ::std::f64::NEG_INFINITY.to_bits() as u128, | ^^^^^^^ | = help: add #![feature(float_bits_conv)] to the crate attributes to enable error[E0599]: no method named `type_dependent_defs` found for type `&'a rustc::ty::TypeckTables<'tcx>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/mut_reference.rs:50:40 | 50 | let def_id = cx.tables.type_dependent_defs()[e.hir_id].def_id(); | ^^^^^^^^^^^^^^^^^^^ field, not a method | = help: did you mean to write `cx.tables.type_dependent_defs` instead of `cx.tables.type_dependent_defs(...)`? error[E0609]: no field `hir_id` on type `&'tcx rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/mut_reference.rs:50:64 | 50 | let def_id = cx.tables.type_dependent_defs()[e.hir_id].def_id(); | ^^^^^^ error[E0609]: no field `hir_id` on type `&'tcx rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/mut_reference.rs:51:54 | 51 | let substs = cx.tables.node_substs(e.hir_id); | ^^^^^^ error[E0609]: no field `hir_id` on type `&syntax::ptr::P<rustc::hir::Expr>` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/no_effect.rs:72:61 | 72 | let def = cx.tables.qpath_def(qpath, callee.hir_id); | ^^^^^^ error[E0609]: no field `hir_id` on type `&syntax::ptr::P<rustc::hir::Expr>` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/no_effect.rs:168:61 | 168 | let def = cx.tables.qpath_def(qpath, callee.hir_id); | ^^^^^^ error[E0609]: no field `hir_id` on type `&syntax::ptr::P<rustc::hir::Expr>` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/panic.rs:43:64 | 43 | match_def_path(cx.tcx, resolve_node(cx, qpath, fun.hir_id).def_id(), &paths::BEGIN_PANIC), | ^^^^^^ error[E0609]: no field `hir_id` on type `&syntax::ptr::P<rustc::hir::Expr>` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/print.rs:76:51 | 76 | let fun = resolve_node(cx, qpath, fun.hir_id); | ^^^^^^ error[E0609]: no field `hir_id` on type `&syntax::ptr::P<rustc::hir::Expr>` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/print.rs:100:73 | 100 | resolve_node(cx, qpath, args_fun.hir_id).def_id(), | ^^^^^^ error[E0609]: no field `hir_id` on type `rustc::hir::Expr` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/print.rs:128:69 | 128 | let def_id = cx.tables.qpath_def(qpath, args[1].hir_id).def_id(); | ^^^^^^ did you mean `id`? error[E0609]: no field `hir_id` on type `&syntax::ptr::P<rustc::hir::Expr>` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/regex.rs:121:57 | 121 | let def_id = cx.tables.qpath_def(qpath, fun.hir_id).def_id(); | ^^^^^^ error[E0599]: no function or associated item named `new` found for type `rustc_const_eval::ConstContext<'_, '_>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/regex.rs:157:11 | 157 | match ConstContext::new(cx.tcx, cx.param_env.and(substs), cx.tables).eval(e) { | ^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/shadow.rs:152:44 | 152 | let var_ty = cx.tables.node_id_to_type(pat_id); | ^^^^^^ expected struct `syntax::ast::NodeId`, found struct `rustc::hir::HirId` | = note: expected type `syntax::ast::NodeId` found type `rustc::hir::HirId` error[E0609]: no field `hir_id` on type `&'tcx rustc::hir::Pat` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/shadow.rs:170:35 | 170 | if is_binding(cx, pat.hir_id) { | ^^^^^^ error[E0609]: no field `hir_id` on type `&syntax::ptr::P<rustc::hir::Expr>` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/transmute.rs:91:67 | 91 | let def_id = cx.tables.qpath_def(qpath, path_expr.hir_id).def_id(); | ^^^^^^ error[E0599]: no method named `node_to_hir_id` found for type `rustc::hir::map::Map<'_>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/types.rs:152:37 | 152 | let hir_id = cx.tcx.hir.node_to_hir_id(ast_ty.id); | ^^^^^^^^^^^^^^ error[E0599]: no method named `node_to_hir_id` found for type `rustc::hir::map::Map<'_>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/types.rs:161:90 | 161 | let Some(did) = opt_def_id(cx.tables.qpath_def(qpath, cx.tcx.hir.node_to_hir_id(vec.id))), | ^^^^^^^^^^^^^^ error[E0599]: no method named `node_to_hir_id` found for type `rustc::hir::map::Map<'_>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/types.rs:205:45 | 205 | let hir_id = cx.tcx.hir.node_to_hir_id(ty.id); | ^^^^^^^^^^^^^^ error[E0599]: no function or associated item named `new` found for type `rustc_const_eval::ConstContext<'_, '_>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/types.rs:1032:20 | 1032 | let cv = match ConstContext::new(cx.tcx, cx.param_env.and(substs), cx.tables).eval(expr) { | ^^^^^^^^^^^^^^^^^ error[E0599]: no function or associated item named `new` found for type `rustc_const_eval::ConstContext<'_, '_>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/types.rs:1240:11 | 1240 | match ConstContext::new(cx.tcx, cx.param_env.and(substs), cx.tables).eval(expr) { | ^^^^^^^^^^^^^^^^^ error[E0599]: no function or associated item named `new` found for type `rustc_const_eval::ConstContext<'_, '_>` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/vec.rs:66:16 | 66 | if ConstContext::new(cx.tcx, cx.param_env.and(substs), cx.tables) | ^^^^^^^^^^^^^^^^^ error: Compilation failed, aborting rustdoc thread 'main' panicked at 'ChainedError { error: Could not document `clippy_lints`., cause: process didn't exit successfully: `rustdoc --crate-name clippy_lints .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.153/src/lib.rs -o /home/cratesfyi/cratesfyi/doc -L dependency=/home/cratesfyi/cratesfyi/debug/deps --extern regex_syntax=/home/cratesfyi/cratesfyi/debug/deps/libregex_syntax-0240ebb185fe3635.rlib --extern-version regex_syntax=regex-syntax,0.4.1 --extern matches=/home/cratesfyi/cratesfyi/debug/deps/libmatches-e2a43ce3f52b9dcc.rlib --extern-version matches=matches,0.1.6 --extern unicode_normalization=/home/cratesfyi/cratesfyi/debug/deps/libunicode_normalization-5554c8b28de87bfc.rlib --extern-version unicode_normalization=unicode-normalization,0.1.5 --extern semver=/home/cratesfyi/cratesfyi/debug/deps/libsemver-70b59fcc83de19e2.rlib --extern-version semver=semver,0.6.0 --extern quine_mc_cluskey=/home/cratesfyi/cratesfyi/debug/deps/libquine_mc_cluskey-6d8f73fdf7c11d33.rlib --extern-version quine_mc_cluskey=quine-mc_cluskey,0.2.4 --extern itertools=/home/cratesfyi/cratesfyi/debug/deps/libitertools-86e98dc5b478f997.rlib --extern-version itertools=itertools,0.6.1 --extern pulldown_cmark=/home/cratesfyi/cratesfyi/debug/deps/libpulldown_cmark-51e76190cc33fac5.rlib --extern-version pulldown_cmark=pulldown-cmark,0.0.15 --extern serde=/home/cratesfyi/cratesfyi/debug/deps/libserde-c7201ac4f95f293e.rlib --extern-version serde=serde,1.0.11 --extern serde_derive=/home/cratesfyi/cratesfyi/debug/deps/libserde_derive-27ac43668445212f.so --extern-version serde_derive=serde_derive,1.0.11 --extern lazy_static=/home/cratesfyi/cratesfyi/debug/deps/liblazy_static-18005fa1be5dd889.rlib --extern-version lazy_static=lazy_static,0.2.8 --extern toml=/home/cratesfyi/cratesfyi/debug/deps/libtoml-43a73e8f4c70aac5.rlib --extern-version toml=toml,0.4.5` (exit code: 101) }', src/bin/cratesfyi.rs:142 note: Run with `RUST_BACKTRACE=1` for a backtrace.