clippy_lints 0.0.147

A bunch of helpful lints to avoid common pitfalls in Rust

Build #66405 2017-07-31 10:42:08

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.147 Fresh unicode-normalization v0.1.5 Fresh quine-mc_cluskey v0.2.4 Fresh lazy_static v0.2.8 Fresh bitflags v0.9.1 Fresh quote v0.3.15 Fresh regex-syntax v0.4.1 Fresh getopts v0.2.14 Fresh semver-parser v0.7.0 Fresh serde v1.0.11 Fresh matches v0.1.6 Fresh unicode-xid v0.0.4 Fresh either v1.1.0 Fresh semver v0.6.0 Fresh synom v0.11.3 Compiling itertools v0.6.1 Fresh syn v0.11.11 Fresh serde_derive_internals v0.15.1 Fresh serde_derive v1.0.11 Fresh toml v0.4.4 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 pulldown-cmark v0.0.15 Documenting clippy_lints v0.0.147 Running `rustdoc --crate-name clippy_lints .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.147/src/lib.rs -o /home/cratesfyi/cratesfyi/doc -L dependency=/home/cratesfyi/cratesfyi/debug/deps --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-a7d305db388eaaf6.rlib --extern-version toml=toml,0.4.4 --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 semver=/home/cratesfyi/cratesfyi/debug/deps/libsemver-70b59fcc83de19e2.rlib --extern-version semver=semver,0.6.0 --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 itertools=/home/cratesfyi/cratesfyi/debug/deps/libitertools-86e98dc5b478f997.rlib --extern-version itertools=itertools,0.6.1 --extern serde=/home/cratesfyi/cratesfyi/debug/deps/libserde-c7201ac4f95f293e.rlib --extern-version serde=serde,1.0.11 --extern pulldown_cmark=/home/cratesfyi/cratesfyi/debug/deps/libpulldown_cmark-51e76190cc33fac5.rlib --extern-version pulldown_cmark=pulldown-cmark,0.0.15 --extern regex_syntax=/home/cratesfyi/cratesfyi/debug/deps/libregex_syntax-0240ebb185fe3635.rlib --extern-version regex_syntax=regex-syntax,0.4.1` 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.147/src/consts.rs:297:48 | 297 | 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.147/src/consts.rs:298:68 | 298 | if let Some((def_id, substs)) = lookup_const_by_id(self.tcx, param_env) { | ^^^^^^^^^^^^^^^^^^^ expected 3 parameters error[E0560]: struct `rustc_errors::CodeSuggestion` has no field named `show_code_when_inline` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.147/src/utils/mod.rs:587:9 | 587 | show_code_when_inline: true, | ^^^^^^^^^^^^^^^^^^^^^^ `rustc_errors::CodeSuggestion` does not have this field 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.147/src/array_indexing.rs:69:31 | 69 | let constcx = ConstContext::new(cx.tcx, cx.param_env.and(substs), cx.tables); | ^^^^^^^^^^^^^^^^^ error[E0061]: this function takes 3 parameters but 2 parameters were supplied --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.147/src/bit_mask.rs:252:36 | 252 | 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.147/src/bit_mask.rs:252:57 | 252 | 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[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.147/src/enum_clike.rs:53:79 | 53 | let bad = match cx.tcx.at(expr.span).const_eval(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.147/src/enum_clike.rs:53:69 | 53 | let bad = match cx.tcx.at(expr.span).const_eval(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[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.147/src/loops.rs:691:23 | 691 | let constcx = ConstContext::new(cx.tcx, cx.param_env.and(substs), cx.tables); | ^^^^^^^^^^^^^^^^^ 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.147/src/matches.rs:399:19 | 399 | let constcx = ConstContext::new(cx.tcx, cx.param_env.and(substs), cx.tables); | ^^^^^^^^^^^^^^^^^ 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.147/src/methods.rs:1233:35 | 1233 | if let Ok(ConstVal::Str(r)) = ConstContext::new(cx.tcx, cx.param_env.and(substs), cx.tables).eval(arg) { | ^^^^^^^^^^^^^^^^^ 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.147/src/misc.rs:396:15 | 396 | let res = 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.147/src/regex.rs:157:11 | 157 | match ConstContext::new(cx.tcx, cx.param_env.and(substs), cx.tables).eval(e) { | ^^^^^^^^^^^^^^^^^ 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.147/src/types.rs:984:20 | 984 | 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.147/src/types.rs:1184:11 | 1184 | 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.147/src/vec.rs:66:16 | 66 | if ConstContext::new(cx.tcx, cx.param_env.and(substs), cx.tables).eval(len).is_ok() { | ^^^^^^^^^^^^^^^^^ 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.147/src/lib.rs -o /home/cratesfyi/cratesfyi/doc -L dependency=/home/cratesfyi/cratesfyi/debug/deps --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-a7d305db388eaaf6.rlib --extern-version toml=toml,0.4.4 --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 semver=/home/cratesfyi/cratesfyi/debug/deps/libsemver-70b59fcc83de19e2.rlib --extern-version semver=semver,0.6.0 --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 itertools=/home/cratesfyi/cratesfyi/debug/deps/libitertools-86e98dc5b478f997.rlib --extern-version itertools=itertools,0.6.1 --extern serde=/home/cratesfyi/cratesfyi/debug/deps/libserde-c7201ac4f95f293e.rlib --extern-version serde=serde,1.0.11 --extern pulldown_cmark=/home/cratesfyi/cratesfyi/debug/deps/libpulldown_cmark-51e76190cc33fac5.rlib --extern-version pulldown_cmark=pulldown-cmark,0.0.15 --extern regex_syntax=/home/cratesfyi/cratesfyi/debug/deps/libregex_syntax-0240ebb185fe3635.rlib --extern-version regex_syntax=regex-syntax,0.4.1` (exit code: 101) }', src/bin/cratesfyi.rs:142 note: Run with `RUST_BACKTRACE=1` for a backtrace.