clippy 0.0.95

A bunch of helpful lints to avoid common pitfalls in Rust

Build #31771 2016-10-06 16:24:23

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.14.0-nightly (289f3a4ca 2016-09-29)

# docs.rs version cratesfyi 0.2.0 (fb1be72 2016-08-29)

# build log Updating registry `https://github.com/rust-lang/crates.io-index` Downloading clippy v0.0.95 Downloading clippy_lints v0.0.95 Compiling regex-syntax v0.3.5 Running `rustc .cargo/registry/src/github.com-1ecc6299db9ec823/regex-syntax-0.3.5/src/lib.rs --crate-name regex_syntax --crate-type lib -g -C metadata=b3fc207b97c83ddf -C extra-filename=-b3fc207b97c83ddf --out-dir /home/cratesfyi/clippy-0.0.95/debug/deps --emit=dep-info,link -L dependency=/home/cratesfyi/clippy-0.0.95/debug/deps -L dependency=/home/cratesfyi/clippy-0.0.95/debug/deps --cap-lints allow` Compiling nom v1.2.4 Running `rustc .cargo/registry/src/github.com-1ecc6299db9ec823/nom-1.2.4/src/lib.rs --crate-name nom --crate-type lib -g --cfg feature=\"stream\" --cfg feature=\"default\" -C metadata=24d7a34b1cbfee73 -C extra-filename=-24d7a34b1cbfee73 --out-dir /home/cratesfyi/clippy-0.0.95/debug/deps --emit=dep-info,link -L dependency=/home/cratesfyi/clippy-0.0.95/debug/deps -L dependency=/home/cratesfyi/clippy-0.0.95/debug/deps --cap-lints allow` Compiling matches v0.1.2 Running `rustc .cargo/registry/src/github.com-1ecc6299db9ec823/matches-0.1.2/lib.rs --crate-name matches --crate-type lib -g -C metadata=5d5580ffd528031c -C extra-filename=-5d5580ffd528031c --out-dir /home/cratesfyi/clippy-0.0.95/debug/deps --emit=dep-info,link -L dependency=/home/cratesfyi/clippy-0.0.95/debug/deps -L dependency=/home/cratesfyi/clippy-0.0.95/debug/deps --cap-lints allow` Compiling unicode-normalization v0.1.2 Running `rustc .cargo/registry/src/github.com-1ecc6299db9ec823/unicode-normalization-0.1.2/src/lib.rs --crate-name unicode_normalization --crate-type lib -g -C metadata=5de3a9c8fd8ddf4e -C extra-filename=-5de3a9c8fd8ddf4e --out-dir /home/cratesfyi/clippy-0.0.95/debug/deps --emit=dep-info,link -L dependency=/home/cratesfyi/clippy-0.0.95/debug/deps -L dependency=/home/cratesfyi/clippy-0.0.95/debug/deps --cap-lints allow` Compiling quine-mc_cluskey v0.2.4 Running `rustc .cargo/registry/src/github.com-1ecc6299db9ec823/quine-mc_cluskey-0.2.4/src/lib.rs --crate-name quine_mc_cluskey --crate-type lib -g -C metadata=84dd239bf0c39084 -C extra-filename=-84dd239bf0c39084 --out-dir /home/cratesfyi/clippy-0.0.95/debug/deps --emit=dep-info,link -L dependency=/home/cratesfyi/clippy-0.0.95/debug/deps -L dependency=/home/cratesfyi/clippy-0.0.95/debug/deps --cap-lints allow` Compiling rustc-serialize v0.3.19 Running `rustc .cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.19/src/lib.rs --crate-name rustc_serialize --crate-type lib -g -C metadata=3561541d79c18212 -C extra-filename=-3561541d79c18212 --out-dir /home/cratesfyi/clippy-0.0.95/debug/deps --emit=dep-info,link -L dependency=/home/cratesfyi/clippy-0.0.95/debug/deps -L dependency=/home/cratesfyi/clippy-0.0.95/debug/deps --cap-lints allow` Compiling semver v0.2.3 Running `rustc .cargo/registry/src/github.com-1ecc6299db9ec823/semver-0.2.3/src/lib.rs --crate-name semver --crate-type lib -g --cfg feature=\"default\" -C metadata=60d1aa0e68346373 -C extra-filename=-60d1aa0e68346373 --out-dir /home/cratesfyi/clippy-0.0.95/debug/deps --emit=dep-info,link -L dependency=/home/cratesfyi/clippy-0.0.95/debug/deps -L dependency=/home/cratesfyi/clippy-0.0.95/debug/deps --extern nom=/home/cratesfyi/clippy-0.0.95/debug/deps/libnom-24d7a34b1cbfee73.rlib --cap-lints allow` Compiling toml v0.1.30 Running `rustc .cargo/registry/src/github.com-1ecc6299db9ec823/toml-0.1.30/src/lib.rs --crate-name toml --crate-type lib -g --cfg feature=\"rustc-serialize\" --cfg feature=\"default\" -C metadata=1a75b37a708f335b -C extra-filename=-1a75b37a708f335b --out-dir /home/cratesfyi/clippy-0.0.95/debug/deps --emit=dep-info,link -L dependency=/home/cratesfyi/clippy-0.0.95/debug/deps -L dependency=/home/cratesfyi/clippy-0.0.95/debug/deps --extern rustc_serialize=/home/cratesfyi/clippy-0.0.95/debug/deps/librustc_serialize-3561541d79c18212.rlib --cap-lints allow` Compiling clippy_lints v0.0.95 Running `rustc .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/lib.rs --crate-name clippy_lints --crate-type lib -g -C metadata=dbe42c1f66e1570f -C extra-filename=-dbe42c1f66e1570f --out-dir /home/cratesfyi/clippy-0.0.95/debug/deps --emit=dep-info,link -L dependency=/home/cratesfyi/clippy-0.0.95/debug/deps -L dependency=/home/cratesfyi/clippy-0.0.95/debug/deps --extern quine_mc_cluskey=/home/cratesfyi/clippy-0.0.95/debug/deps/libquine_mc_cluskey-84dd239bf0c39084.rlib --extern toml=/home/cratesfyi/clippy-0.0.95/debug/deps/libtoml-1a75b37a708f335b.rlib --extern unicode_normalization=/home/cratesfyi/clippy-0.0.95/debug/deps/libunicode_normalization-5de3a9c8fd8ddf4e.rlib --extern matches=/home/cratesfyi/clippy-0.0.95/debug/deps/libmatches-5d5580ffd528031c.rlib --extern semver=/home/cratesfyi/clippy-0.0.95/debug/deps/libsemver-60d1aa0e68346373.rlib --extern rustc_serialize=/home/cratesfyi/clippy-0.0.95/debug/deps/librustc_serialize-3561541d79c18212.rlib --extern regex_syntax=/home/cratesfyi/clippy-0.0.95/debug/deps/libregex_syntax-b3fc207b97c83ddf.rlib --cap-lints allow` error[E0531]: unresolved variant or struct `ExprArray` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/consts.rs:260:13 | 260 | ExprArray(ref vec) => self.multi(vec).map(Constant::Vec), | ^^^^^^^^^ error[E0531]: unresolved variant or struct `ExprArray` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/utils/hir.rs:129:15 | 129 | (&ExprArray(ref l), &ExprArray(ref r)) => self.eq_exprs(l, r), | ^^^^^^^^^ error[E0531]: unresolved variant or struct `ExprArray` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/utils/hir.rs:129:34 | 129 | (&ExprArray(ref l), &ExprArray(ref r)) => self.eq_exprs(l, r), | ^^^^^^^^^ error[E0531]: unresolved variant or struct `TySlice` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/utils/hir.rs:215:15 | 215 | (&TySlice(ref l_vec), &TySlice(ref r_vec)) => self.eq_ty(l_vec, r_vec), | ^^^^^^^ error[E0531]: unresolved variant or struct `TySlice` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/utils/hir.rs:215:36 | 215 | (&TySlice(ref l_vec), &TySlice(ref r_vec)) => self.eq_ty(l_vec, r_vec), | ^^^^^^^ error[E0531]: unresolved variant or struct `TyArray` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/utils/hir.rs:216:15 | 216 | (&TyArray(ref lt, ref ll), &TyArray(ref rt, ref rl)) => { | ^^^^^^^ error[E0531]: unresolved variant or struct `TyArray` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/utils/hir.rs:216:41 | 216 | (&TyArray(ref lt, ref ll), &TyArray(ref rt, ref rl)) => { | ^^^^^^^ error[E0531]: unresolved variant or struct `ExprArray` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/utils/hir.rs:494:13 | 494 | ExprArray(ref v) => { | ^^^^^^^^^ error[E0425]: unresolved name `ExprArray` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/utils/hir.rs:495:37 | 495 | let c: fn(_) -> _ = ExprArray; | ^^^^^^^^^ unresolved name error[E0531]: unresolved variant or struct `ExprArray` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/utils/sugg.rs:53:17 | 53 | hir::ExprArray(..) | | ^^^^^^^^^^^^^^ error[E0531]: unresolved variant or struct `ExprArray` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/utils/higher.rs:183:21 | 170 | if_let_chain!{[ | - in this macro invocation ... 183 | let hir::ExprArray(ref args) = boxed.node | ^^^^^^^^^^^^^^ error[E0531]: unresolved variant or struct `ExprArray` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/eval_order_dependence.rs:216:9 | 216 | ExprArray(_) | | ^^^^^^^^^ error[E0531]: unresolved variant or struct `ExprArray` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/format.rs:85:13 | 76 | if_let_chain! {[ | - in this macro invocation ... 85 | let ExprArray(ref exprs) = expr.node, | ^^^^^^^^^ error[E0531]: unresolved variant or struct `ExprArray` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/format.rs:126:13 | 119 | if_let_chain! {[ | - in this macro invocation ... 126 | let ExprArray(ref exprs) = arms[0].body.node, | ^^^^^^^^^ error[E0531]: unresolved variant or struct `ExprArray` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/regex.rs:193:13 | 191 | if_let_chain! {[ | - in this macro invocation 192 | let ExprAddrOf(_, ref expr) = expr.node, 193 | let ExprArray(ref exprs) = expr.node, | ^^^^^^^^^ error[E0531]: unresolved variant or struct `ExprArray` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/shadow.rs:284:9 | 284 | ExprArray(ref v) | ExprTup(ref v) => { | ^^^^^^^^^ error[E0531]: unresolved variant or struct `TySlice` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/shadow.rs:322:9 | 322 | TySlice(ref sty) => check_ty(cx, sty, bindings), | ^^^^^^^ error[E0531]: unresolved variant or struct `TyArray` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/shadow.rs:323:9 | 323 | TyArray(ref fty, ref expr) => { | ^^^^^^^ error[E0531]: unresolved variant or struct `TySlice` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/types.rs:630:13 | 630 | TySlice(..) | | ^^^^^^^ error[E0531]: unresolved variant or struct `TyArray` --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/types.rs:632:13 | 632 | TyArray(..) => (10 * self.nest, 1), | ^^^^^^^ error: no associated item named `Slice` found for type `rustc::hir::PatKind` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/utils/hir.rs:170:15 | 170 | (&PatKind::Slice(ref ls, ref li, ref le), &PatKind::Slice(ref rs, ref ri, ref re)) => { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: no associated item named `Slice` found for type `rustc::hir::PatKind` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/utils/hir.rs:170:56 | 170 | (&PatKind::Slice(ref ls, ref li, ref le), &PatKind::Slice(ref rs, ref ri, ref re)) => { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: no associated item named `new` found for type `std::collections::hash_map::DefaultHasher` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/utils/hir.rs:283:16 | 283 | s: DefaultHasher::new(), | ^^^^^^^^^^^^^^^^^^ error: attempted access of field `def` on type `&rustc::hir::def::Export`, but no field with that name was found --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/utils/mod.rs:237:37 | 237 | return Some(item.def); | ^^^^^^^^ error: attempted access of field `def` on type `&rustc::hir::def::Export`, but no field with that name was found --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/utils/mod.rs:240:50 | 240 | items = cstore.item_children(item.def.def_id()); | ^^^^^^^^ error: no associated item named `Slice` found for type `rustc::hir::PatKind` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/utils/mod.rs:753:9 | 753 | PatKind::Slice(ref head, ref middle, ref tail) => { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: no associated item named `VariantCtor` found for type `rustc::hir::def::Def` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/utils/mod.rs:726:110 | 726 | matches!(cx.tcx.def_map.borrow().get(&did).map(|d| d.full_def()), Some(def::Def::Variant(..)) | Some(def::Def::VariantCtor(..))) | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: no associated item named `Slice` found for type `rustc::hir::PatKind` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/copies.rs:268:13 | 268 | PatKind::Slice(ref lhs, ref mid, ref rhs) => { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: attempted access of field `def` on type `&rustc::hir::def::Export`, but no field with that name was found --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/enum_glob_use.rs:63:55 | 63 | if let Def::Variant(..) = child.def { | ^^^^^^^^^ error: no associated item named `ExprArray` found for type `rustc::hir::Expr_` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/no_effect.rs:53:9 | 53 | Expr_::ExprArray(ref v) | | ^^^^^^^^^^^^^^^^^^^^^^^ error: no associated item named `StructCtor` found for type `rustc::hir::def::Def` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/no_effect.rs:75:22 | 75 | Some(Def::StructCtor(..)) | | ^^^^^^^^^^^^^^^^^^^ error: no associated item named `VariantCtor` found for type `rustc::hir::def::Def` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/no_effect.rs:76:22 | 76 | Some(Def::VariantCtor(..)) => args.iter().all(|arg| has_no_effect(cx, arg)), | ^^^^^^^^^^^^^^^^^^^^ error: no associated item named `ExprArray` found for type `rustc::hir::Expr_` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/no_effect.rs:135:9 | 135 | Expr_::ExprArray(ref v) | | ^^^^^^^^^^^^^^^^^^^^^^^ error: no associated item named `StructCtor` found for type `rustc::hir::def::Def` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/no_effect.rs:152:22 | 152 | Some(Def::StructCtor(..)) | | ^^^^^^^^^^^^^^^^^^^ error: no associated item named `VariantCtor` found for type `rustc::hir::def::Def` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/no_effect.rs:153:22 | 153 | Some(Def::VariantCtor(..)) => Some(args.iter().map(Deref::deref).collect()), | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to 15 previous errors thread 'main' panicked at 'ChainedError { error: failed to compile `clippy v0.0.95`, intermediate artifacts can be found at `/home/cratesfyi/clippy-0.0.95`, cause: ChainedError { error: Could not compile `clippy_lints`., cause: Process didn't exit successfully: `rustc .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.95/src/lib.rs --crate-name clippy_lints --crate-type lib -g -C metadata=dbe42c1f66e1570f -C extra-filename=-dbe42c1f66e1570f --out-dir /home/cratesfyi/clippy-0.0.95/debug/deps --emit=dep-info,link -L dependency=/home/cratesfyi/clippy-0.0.95/debug/deps -L dependency=/home/cratesfyi/clippy-0.0.95/debug/deps --extern quine_mc_cluskey=/home/cratesfyi/clippy-0.0.95/debug/deps/libquine_mc_cluskey-84dd239bf0c39084.rlib --extern toml=/home/cratesfyi/clippy-0.0.95/debug/deps/libtoml-1a75b37a708f335b.rlib --extern unicode_normalization=/home/cratesfyi/clippy-0.0.95/debug/deps/libunicode_normalization-5de3a9c8fd8ddf4e.rlib --extern matches=/home/cratesfyi/clippy-0.0.95/debug/deps/libmatches-5d5580ffd528031c.rlib --extern semver=/home/cratesfyi/clippy-0.0.95/debug/deps/libsemver-60d1aa0e68346373.rlib --extern rustc_serialize=/home/cratesfyi/clippy-0.0.95/debug/deps/librustc_serialize-3561541d79c18212.rlib --extern regex_syntax=/home/cratesfyi/clippy-0.0.95/debug/deps/libregex_syntax-b3fc207b97c83ddf.rlib --cap-lints allow` (exit code: 101) } }', src/bin/cratesfyi.rs:132 note: Run with `RUST_BACKTRACE=1` for a backtrace.