clippy 0.0.156

A bunch of helpful lints to avoid common pitfalls in Rust

Build #69565 2017-09-03 21:03:18

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.21.0-dev (d835dc82b 2017-08-29)

# 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 v0.0.156 Fresh itoa v0.3.3 Fresh unicode-xid v0.0.4 Fresh dtoa v0.4.2 Fresh either v1.1.0 Fresh bitflags v0.9.1 Fresh getopts v0.2.14 Fresh quote v0.3.15 Fresh regex-syntax v0.4.1 Fresh lazy_static v0.2.8 Fresh num-traits v0.1.40 Fresh semver-parser v0.7.0 Fresh itertools v0.6.2 Fresh unicode-normalization v0.1.5 Fresh quine-mc_cluskey v0.2.4 Fresh matches v0.1.6 Fresh serde v1.0.11 Fresh synom v0.11.3 Fresh semver v0.6.0 Fresh serde_json v1.0.2 Fresh toml v0.4.5 Fresh pulldown-cmark v0.0.15 Fresh syn v0.11.11 Fresh serde_derive_internals v0.15.1 Fresh serde_derive v1.0.11 Fresh cargo_metadata v0.2.3 Compiling clippy_lints v0.0.156 Running `rustc --crate-name clippy_lints .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=68b41dac8b3b5a6c -C extra-filename=-68b41dac8b3b5a6c --out-dir /home/cratesfyi/cratesfyi/debug/deps -L dependency=/home/cratesfyi/cratesfyi/debug/deps --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-d225ddfcb503bcb8.rlib --extern-version itertools=itertools,0.6.2 --extern lazy_static=/home/cratesfyi/cratesfyi/debug/deps/liblazy_static-18005fa1be5dd889.rlib --extern-version lazy_static=lazy_static,0.2.8 --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 serde_derive=/home/cratesfyi/cratesfyi/debug/deps/libserde_derive-27ac43668445212f.so --extern-version serde_derive=serde_derive,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 serde=/home/cratesfyi/cratesfyi/debug/deps/libserde-c7201ac4f95f293e.rlib --extern-version serde=serde,1.0.11 --extern matches=/home/cratesfyi/cratesfyi/debug/deps/libmatches-e2a43ce3f52b9dcc.rlib --extern-version matches=matches,0.1.6 --extern regex_syntax=/home/cratesfyi/cratesfyi/debug/deps/libregex_syntax-0240ebb185fe3635.rlib --extern-version regex_syntax=regex-syntax,0.4.1 --extern toml=/home/cratesfyi/cratesfyi/debug/deps/libtoml-43a73e8f4c70aac5.rlib --extern-version toml=toml,0.4.5 --cap-lints allow` error[E0599]: no method named `ctxt` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/utils/mod.rs:101:9 | 101 | rhs.ctxt() != lhs.ctxt() | ^^^^ field, not a method | = help: did you mean to write `rhs.ctxt` instead of `rhs.ctxt(...)`? error[E0599]: no method named `ctxt` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/utils/mod.rs:101:23 | 101 | rhs.ctxt() != lhs.ctxt() | ^^^^ field, not a method | = help: did you mean to write `lhs.ctxt` instead of `lhs.ctxt(...)`? error[E0599]: no method named `ctxt` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/utils/mod.rs:117:10 | 117 | span.ctxt().outer().expn_info().map_or(false, |info| { | ^^^^ field, not a method | = help: did you mean to write `span.ctxt` instead of `span.ctxt(...)`? error[E0599]: no method named `ctxt` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/utils/mod.rs:150:10 | 150 | span.ctxt().outer().expn_info().map_or(false, |info| { | ^^^^ field, not a method | = help: did you mean to write `span.ctxt` instead of `span.ctxt(...)`? error[E0599]: no method named `ctxt` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/utils/mod.rs:744:35 | 744 | let span_name_span = span.ctxt().outer().expn_info().map(|ei| { | ^^^^ field, not a method | = help: did you mean to write `span.ctxt` instead of `span.ctxt(...)`? error[E0599]: no method named `ctxt` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/utils/mod.rs:766:31 | 766 | let span_name_span = span.ctxt().outer().expn_info().map(|ei| { | ^^^^ field, not a method | = help: did you mean to write `span.ctxt` instead of `span.ctxt(...)`? error[E0599]: no method named `lo` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/utils/sugg.rs:395:55 | 395 | let lo = cx.sess().codemap().lookup_char_pos(span.lo()); | ^^ field, not a method | = help: did you mean to write `span.lo` instead of `span.lo(...)`? error[E0599]: no method named `with_hi` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/utils/sugg.rs:446:29 | 446 | let span = item.with_hi(item.lo()); | ^^^^^^^ error[E0599]: no method named `lo` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/utils/sugg.rs:446:42 | 446 | let span = item.with_hi(item.lo()); | ^^ field, not a method | = help: did you mean to write `item.lo` instead of `item.lo(...)`? error[E0599]: no method named `with_hi` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/utils/sugg.rs:454:29 | 454 | let span = item.with_hi(item.lo()); | ^^^^^^^ error[E0599]: no method named `lo` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/utils/sugg.rs:454:42 | 454 | let span = item.with_hi(item.lo()); | ^^ field, not a method | = help: did you mean to write `item.lo` instead of `item.lo(...)`? error[E0599]: no method named `ctxt` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/utils/internal_lints.rs:140:18 | 140 | .ctxt() | ^^^^ field, not a method | = help: did you mean to write `lint_span.ctxt` instead of `lint_span.ctxt(...)`? error[E0599]: no method named `ctxt` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/collapsible_if.rs:129:22 | 129 | if expr.span.ctxt() != inner.span.ctxt() { | ^^^^ field, not a method | = help: did you mean to write `expr.span.ctxt` instead of `expr.span.ctxt(...)`? error[E0599]: no method named `ctxt` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/collapsible_if.rs:129:43 | 129 | if expr.span.ctxt() != inner.span.ctxt() { | ^^^^ field, not a method | = help: did you mean to write `inner.span.ctxt` instead of `inner.span.ctxt(...)`? error[E0599]: no method named `with_lo` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/doc.rs:99:30 | 99 | span.with_lo(span.lo() + BytePos(prefix.len() as u32)), | ^^^^^^^ error[E0599]: no method named `lo` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/doc.rs:99:43 | 99 | span.with_lo(span.lo() + BytePos(prefix.len() as u32)), | ^^ field, not a method | = help: did you mean to write `span.lo` instead of `span.lo(...)`? error[E0599]: no method named `with_lo` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/doc.rs:117:22 | 117 | span.with_lo(span.lo() + BytePos(offset as u32)), | ^^^^^^^ error[E0599]: no method named `lo` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/doc.rs:117:35 | 117 | span.with_lo(span.lo() + BytePos(offset as u32)), | ^^ field, not a method | = help: did you mean to write `span.lo` instead of `span.lo(...)`? error[E0599]: no method named `with_lo` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/doc.rs:225:37 | 225 | let span = span.with_lo(span.lo() + BytePos::from_usize(offset - begin)); | ^^^^^^^ error[E0599]: no method named `lo` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/doc.rs:225:50 | 225 | let span = span.with_lo(span.lo() + BytePos::from_usize(offset - begin)); | ^^ field, not a method | = help: did you mean to write `span.lo` instead of `span.lo(...)`? error[E0599]: no function or associated item named `new` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/doc.rs:247:20 | 247 | let span = Span::new( | ^^^^^^^^^ error[E0599]: no method named `lo` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/doc.rs:248:18 | 248 | span.lo() + BytePos::from_usize(offset), | ^^ field, not a method | = help: did you mean to write `span.lo` instead of `span.lo(...)`? error[E0599]: no method named `lo` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/doc.rs:249:18 | 249 | span.lo() + BytePos::from_usize(offset + word.len()), | ^^ field, not a method | = help: did you mean to write `span.lo` instead of `span.lo(...)`? error[E0599]: no method named `ctxt` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/doc.rs:250:18 | 250 | span.ctxt(), | ^^^^ field, not a method | = help: did you mean to write `span.ctxt` instead of `span.ctxt(...)`? error[E0599]: no method named `with_lo` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/formatting.rs:173:50 | 173 | let lint_span = lhs.span.with_lo(lhs.span.hi()); | ^^^^^^^ error[E0599]: no method named `hi` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/formatting.rs:173:67 | 173 | let lint_span = lhs.span.with_lo(lhs.span.hi()); | ^^ field, not a method | = help: did you mean to write `lhs.span.hi` instead of `lhs.span.hi(...)`? error[E0599]: no method named `with_hi` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/if_let_redundant_pattern_matching.rs:76:42 | 76 | let span = expr.span.with_hi(op.span.hi()); | ^^^^^^^ error[E0599]: no method named `hi` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/if_let_redundant_pattern_matching.rs:76:58 | 76 | let span = expr.span.with_hi(op.span.hi()); | ^^ field, not a method | = help: did you mean to write `op.span.hi` instead of `op.span.hi(...)`? error[E0308]: mismatched types --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/loops.rs:625:60 | 625 | let pat_extent = region_maps.var_scope(pat.hir_id.local_id); | ^^^^^^^^^^^^^^^^^^^ expected struct `syntax::ast::NodeId`, found struct `rustc::hir::ItemLocalId` | = note: expected type `syntax::ast::NodeId` found type `rustc::hir::ItemLocalId` error[E0308]: mismatched types --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/loops.rs:1071:83 | 1071 | let extent = self.cx.tcx.region_maps(parent_def_id).var_scope(hir_id.local_id); | ^^^^^^^^^^^^^^^ expected struct `syntax::ast::NodeId`, found struct `rustc::hir::ItemLocalId` | = note: expected type `syntax::ast::NodeId` found type `rustc::hir::ItemLocalId` error[E0599]: no method named `ctxt` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/methods.rs:1095:42 | 1095 | let same_span = map_args[1].span.ctxt() == unwrap_args[1].span.ctxt(); | ^^^^ field, not a method | = help: did you mean to write `map_args[1].span.ctxt` instead of `map_args[1].span.ctxt(...)`? error[E0599]: no method named `ctxt` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/methods.rs:1095:72 | 1095 | let same_span = map_args[1].span.ctxt() == unwrap_args[1].span.ctxt(); | ^^^^ field, not a method | = help: did you mean to write `unwrap_args[1].span.ctxt` instead of `unwrap_args[1].span.ctxt(...)`? error[E0599]: no method named `ctxt` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/methods.rs:1128:42 | 1128 | let same_span = map_args[1].span.ctxt() == unwrap_args[1].span.ctxt(); | ^^^^ field, not a method | = help: did you mean to write `map_args[1].span.ctxt` instead of `map_args[1].span.ctxt(...)`? error[E0599]: no method named `ctxt` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/methods.rs:1128:72 | 1128 | let same_span = map_args[1].span.ctxt() == unwrap_args[1].span.ctxt(); | ^^^^ field, not a method | = help: did you mean to write `unwrap_args[1].span.ctxt` instead of `unwrap_args[1].span.ctxt(...)`? error[E0599]: no method named `ctxt` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/misc.rs:570:15 | 570 | expr.span.ctxt().outer().expn_info().map_or( | ^^^^ field, not a method | = help: did you mean to write `expr.span.ctxt` instead of `expr.span.ctxt(...)`? error[E0599]: no function or associated item named `new` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/regex.rs:142:13 | 142 | Span::new( | ^^^^^^^^^ error[E0599]: no method named `lo` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/regex.rs:143:22 | 143 | base.lo() + BytePos(l as u32), | ^^ field, not a method | = help: did you mean to write `base.lo` instead of `base.lo(...)`? error[E0599]: no method named `lo` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/regex.rs:144:22 | 144 | base.lo() + BytePos(h as u32), | ^^ field, not a method | = help: did you mean to write `base.lo` instead of `base.lo(...)`? error[E0599]: no method named `ctxt` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/regex.rs:145:22 | 145 | base.ctxt(), | ^^^^ field, not a method | = help: did you mean to write `base.ctxt` instead of `base.ctxt(...)`? error[E0599]: no method named `ctxt` found for type `syntax_pos::Span` in the current scope --> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/vec.rs:54:33 | 54 | let span = arg.span.ctxt().outer().expn_info().map(|info| info.call_site).expect("unable to get call_site"); | ^^^^ field, not a method | = help: did you mean to write `arg.span.ctxt` instead of `arg.span.ctxt(...)`? error: aborting due to 40 previous errors thread 'main' panicked at 'ChainedError { error: Could not compile `clippy_lints`., cause: process didn't exit successfully: `rustc --crate-name clippy_lints .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.156/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=68b41dac8b3b5a6c -C extra-filename=-68b41dac8b3b5a6c --out-dir /home/cratesfyi/cratesfyi/debug/deps -L dependency=/home/cratesfyi/cratesfyi/debug/deps --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-d225ddfcb503bcb8.rlib --extern-version itertools=itertools,0.6.2 --extern lazy_static=/home/cratesfyi/cratesfyi/debug/deps/liblazy_static-18005fa1be5dd889.rlib --extern-version lazy_static=lazy_static,0.2.8 --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 serde_derive=/home/cratesfyi/cratesfyi/debug/deps/libserde_derive-27ac43668445212f.so --extern-version serde_derive=serde_derive,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 serde=/home/cratesfyi/cratesfyi/debug/deps/libserde-c7201ac4f95f293e.rlib --extern-version serde=serde,1.0.11 --extern matches=/home/cratesfyi/cratesfyi/debug/deps/libmatches-e2a43ce3f52b9dcc.rlib --extern-version matches=matches,0.1.6 --extern regex_syntax=/home/cratesfyi/cratesfyi/debug/deps/libregex_syntax-0240ebb185fe3635.rlib --extern-version regex_syntax=regex-syntax,0.4.1 --extern toml=/home/cratesfyi/cratesfyi/debug/deps/libtoml-43a73e8f4c70aac5.rlib --extern-version toml=toml,0.4.5 --cap-lints allow` (exit code: 101) }', src/bin/cratesfyi.rs:142 note: Run with `RUST_BACKTRACE=1` for a backtrace.