Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clippy 0.0.159 fails to compile on rustc 1.22.0-nightly (dd08c3070 2017-09-12) #2047

Closed
antifuchs opened this issue Sep 13, 2017 · 3 comments
Assignees

Comments

@antifuchs
Copy link

Heya! I have a CI job that's failing to install clippy on nightly again. You can see output from that at https://travis-ci.org/antifuchs/ratelimit_meter/jobs/274891038, and here's a paste of what happens when I do it locally:

rustup run nightly cargo install --force clippy
    Updating registry `https://github.com/rust-lang/crates.io-index`
  Installing clippy v0.0.159
   Compiling either v1.1.0
   Compiling lazy_static v0.2.8
   Compiling matches v0.1.6
   Compiling quine-mc_cluskey v0.2.4
   Compiling quote v0.3.15
   Compiling dtoa v0.4.2
   Compiling getopts v0.2.15
   Compiling regex-syntax v0.4.1
   Compiling serde v1.0.14
   Compiling bitflags v0.9.1
   Compiling pulldown-cmark v0.0.15
   Compiling semver-parser v0.7.0
   Compiling unicode-normalization v0.1.5
   Compiling unicode-xid v0.0.4
   Compiling num-traits v0.1.40
   Compiling itoa v0.3.3
   Compiling itertools v0.6.2
   Compiling semver v0.6.0
   Compiling synom v0.11.3
   Compiling syn v0.11.11
   Compiling serde_json v1.0.3
   Compiling toml v0.4.5
   Compiling serde_derive_internals v0.16.0
   Compiling serde_derive v1.0.14
   Compiling clippy_lints v0.0.159
   Compiling cargo_metadata v0.2.3
error[E0609]: no field `int_type` on type `rustc::session::config::Config`
   --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/consts.rs:178:95
    |
178 |                 Constant::Int(ConstInt::new_signed_truncating(n as i128, ity, tcx.sess.target.int_type))
    |                                                                                               ^^^^^^^^ unknown field
    |
    = note: available fields are: `target`, `isize_ty`, `usize_ty`

error[E0609]: no field `uint_type` on type `rustc::session::config::Config`
   --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/consts.rs:181:97
    |
181 |                 Constant::Int(ConstInt::new_unsigned_truncating(n as u128, uty, tcx.sess.target.uint_type))
    |                                                                                                 ^^^^^^^^^ unknown field
    |
    = note: available fields are: `target`, `isize_ty`, `usize_ty`

error[E0308]: mismatched types
   --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/consts.rs:255:72
    |
255 |                 self.expr(value).map(|v| Constant::Repeat(Box::new(v), n))
    |                                                                        ^ expected usize, found reference
    |
    = note: expected type `usize`
               found type `&rustc::ty::Const<'_>`

error[E0609]: no field `uint_type` on type `rustc::session::config::Config`
  --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/array_indexing.rs:66:67
   |
66 |                     ConstUsize::new(size as u64, cx.sess().target.uint_type).expect("array size is invalid"),
   |                                                                   ^^^^^^^^^ unknown field
   |
   = note: available fields are: `target`, `isize_ty`, `usize_ty`

error[E0308]: mismatched types
  --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/array_indexing.rs:75:27
   |
75 |                 if let Ok(ConstVal::Integral(const_index)) = const_index {
   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
   |
   = note: expected type `&rustc::ty::Const<'_>`
              found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
  --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/array_indexing.rs:88:64
   |
88 |                     if let Some((start, end)) = to_const_range(&start, &end, range.limits, size) {
   |                                                                ^^^^^^ expected enum `rustc::middle::const_val::ConstVal`, found reference
   |
   = note: expected type `&serde::export::Option<serde::export::Option<rustc::middle::const_val::ConstVal<'_>>>`
              found type `&serde::export::Option<serde::export::Option<&rustc::ty::Const<'_>>>`
   = help: here are some functions which might fulfill your needs:
           - .map_or(...)
           - .map_or_else(...)

error[E0308]: mismatched types
  --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/array_indexing.rs:88:72
   |
88 |                     if let Some((start, end)) = to_const_range(&start, &end, range.limits, size) {
   |                                                                        ^^^^ expected enum `rustc::middle::const_val::ConstVal`, found reference
   |
   = note: expected type `&serde::export::Option<serde::export::Option<rustc::middle::const_val::ConstVal<'_>>>`
              found type `&serde::export::Option<serde::export::Option<&rustc::ty::Const<'_>>>`
   = help: here are some functions which might fulfill your needs:
           - .map_or(...)
           - .map_or_else(...)

error[E0606]: casting `&rustc::ty::Const<'_>` as `u64` is invalid
  --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/array_indexing.rs:66:37
   |
66 |                     ConstUsize::new(size as u64, cx.sess().target.uint_type).expect("array size is invalid"),
   |                                     ^^^^^^^^^^^

error[E0369]: binary operation `>` cannot be applied to type `&rustc::ty::Const<'_>`
   --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/derive.rs:147:49
    |
147 |                         ty::TyArray(_, size) if size > 32 => {
    |                                                 ^^^^^^^^^
    |
    = note: an implementation of `std::cmp::PartialOrd` might be missing for `&rustc::ty::Const<'_>`

error[E0308]: mismatched types
  --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/enum_clike.rs:58:28
   |
58 |                         Ok(ConstVal::Integral(Usize(Us64(i)))) => u64::from(i as u32) != i,
   |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
   |
   = note: expected type `&rustc::ty::Const<'_>`
              found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
  --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/enum_clike.rs:59:28
   |
59 |                         Ok(ConstVal::Integral(Isize(Is64(i)))) => i64::from(i as i32) != i,
   |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
   |
   = note: expected type `&rustc::ty::Const<'_>`
              found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
   --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/loops.rs:992:22
    |
992 |                     (ConstVal::Integral(start_idx), ConstVal::Integral(end_idx)) => {
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
    |
    = note: expected type `&rustc::ty::Const<'_>`
               found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
   --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/loops.rs:992:53
    |
992 |                     (ConstVal::Integral(start_idx), ConstVal::Integral(end_idx)) => {
    |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
    |
    = note: expected type `&rustc::ty::Const<'_>`
               found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/loops.rs:1464:24
     |
1464 |         ty::TyArray(_, 0...32) => true,
     |                        ^^^^^^ expected reference, found integral variable
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `{integer}`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/loops.rs:1464:24
     |
1464 |         ty::TyArray(_, 0...32) => true,
     |                        ^^^^^^ expected reference, found integral variable
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `{integer}`

error[E0308]: mismatched types
   --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/matches.rs:447:71
    |
447 |                     return Some(SpannedRange { span: pat.span, node: (value.clone(), Bound::Included(value)) });
    |                                                                       ^^^^^^^^^^^^^ expected reference, found struct `rustc::ty::Const`
    |
    = note: expected type `&rustc::ty::Const<'_>`
               found type `rustc::ty::Const<'_>`
    = help: try with `&value.clone()`

error[E0277]: the trait bound `std::vec::Vec<matches::SpannedRange<rustc::middle::const_val::ConstVal<'_>>>: std::iter::FromIterator<matches::SpannedRange<&rustc::ty::Const<'_>>>` is not satisfied
   --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/matches.rs:453:10
    |
453 |         .collect()
    |          ^^^^^^^ a collection of type `std::vec::Vec<matches::SpannedRange<rustc::middle::const_val::ConstVal<'_>>>` cannot be built from an iterator over elements of type `matches::SpannedRange<&rustc::ty::Const<'_>>`
    |
    = help: the trait `std::iter::FromIterator<matches::SpannedRange<&rustc::ty::Const<'_>>>` is not implemented for `std::vec::Vec<matches::SpannedRange<rustc::middle::const_val::ConstVal<'_>>>`

error[E0369]: binary operation `<` cannot be applied to type `&rustc::ty::Const<'_>`
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/methods.rs:1052:37
     |
1052 |             ty::TyArray(_, size) => size < 32,
     |                                     ^^^^^^^^^
     |
     = note: an implementation of `std::cmp::PartialOrd` might be missing for `&rustc::ty::Const<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/methods.rs:1324:15
     |
1324 |     if let Ok(ConstVal::Str(r)) = ConstContext::new(cx.tcx, cx.param_env.and(substs), cx.tables).eval(arg) {
     |               ^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
   --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/misc.rs:427:15
    |
427 |     if let Ok(ConstVal::Float(val)) = res {
    |               ^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
    |
    = note: expected type `&rustc::ty::Const<'_>`
               found type `rustc::middle::const_val::ConstVal<'_>`

error[E0061]: this function takes 0 parameters but 1 parameter was supplied
  --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/ranges.rs:60:34
   |
60 |                     if us.as_u64(cx.sess().target.uint_type) == 0 {
   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 0 parameters

error[E0609]: no field `uint_type` on type `rustc::session::config::Config`
  --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/ranges.rs:60:51
   |
60 |                     if us.as_u64(cx.sess().target.uint_type) == 0 {
   |                                                   ^^^^^^^^^ unknown field
   |
   = note: available fields are: `target`, `isize_ty`, `usize_ty`

error[E0308]: mismatched types
   --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/regex.rs:153:12
    |
153 |         Ok(ConstVal::Str(r)) => Some(r),
    |            ^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
    |
    = note: expected type `&rustc::ty::Const<'_>`
               found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1133:23
     |
1133 |         (&ty::TyBool, Bool(false)) |
     |                       ^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1134:33
     |
1134 |         (&ty::TyInt(IntTy::Is), Integral(Isize(Is32(::std::i32::MIN)))) |
     |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1135:33
     |
1135 |         (&ty::TyInt(IntTy::Is), Integral(Isize(Is64(::std::i64::MIN)))) |
     |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1136:33
     |
1136 |         (&ty::TyInt(IntTy::I8), Integral(I8(::std::i8::MIN))) |
     |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1137:34
     |
1137 |         (&ty::TyInt(IntTy::I16), Integral(I16(::std::i16::MIN))) |
     |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1138:34
     |
1138 |         (&ty::TyInt(IntTy::I32), Integral(I32(::std::i32::MIN))) |
     |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1139:34
     |
1139 |         (&ty::TyInt(IntTy::I64), Integral(I64(::std::i64::MIN))) |
     |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1140:35
     |
1140 |         (&ty::TyInt(IntTy::I128), Integral(I128(::std::i128::MIN))) |
     |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1141:35
     |
1141 |         (&ty::TyUint(UintTy::Us), Integral(Usize(Us32(::std::u32::MIN)))) |
     |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1142:35
     |
1142 |         (&ty::TyUint(UintTy::Us), Integral(Usize(Us64(::std::u64::MIN)))) |
     |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1143:35
     |
1143 |         (&ty::TyUint(UintTy::U8), Integral(U8(::std::u8::MIN))) |
     |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1144:36
     |
1144 |         (&ty::TyUint(UintTy::U16), Integral(U16(::std::u16::MIN))) |
     |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1145:36
     |
1145 |         (&ty::TyUint(UintTy::U32), Integral(U32(::std::u32::MIN))) |
     |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1146:36
     |
1146 |         (&ty::TyUint(UintTy::U64), Integral(U64(::std::u64::MIN))) |
     |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1147:37
     |
1147 |         (&ty::TyUint(UintTy::U128), Integral(U128(::std::u128::MIN))) => Minimum,
     |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1149:23
     |
1149 |         (&ty::TyBool, Bool(true)) |
     |                       ^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1150:33
     |
1150 |         (&ty::TyInt(IntTy::Is), Integral(Isize(Is32(::std::i32::MAX)))) |
     |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1151:33
     |
1151 |         (&ty::TyInt(IntTy::Is), Integral(Isize(Is64(::std::i64::MAX)))) |
     |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1152:33
     |
1152 |         (&ty::TyInt(IntTy::I8), Integral(I8(::std::i8::MAX))) |
     |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1153:34
     |
1153 |         (&ty::TyInt(IntTy::I16), Integral(I16(::std::i16::MAX))) |
     |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1154:34
     |
1154 |         (&ty::TyInt(IntTy::I32), Integral(I32(::std::i32::MAX))) |
     |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1155:34
     |
1155 |         (&ty::TyInt(IntTy::I64), Integral(I64(::std::i64::MAX))) |
     |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1156:35
     |
1156 |         (&ty::TyInt(IntTy::I128), Integral(I128(::std::i128::MAX))) |
     |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1157:35
     |
1157 |         (&ty::TyUint(UintTy::Us), Integral(Usize(Us32(::std::u32::MAX)))) |
     |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1158:35
     |
1158 |         (&ty::TyUint(UintTy::Us), Integral(Usize(Us64(::std::u64::MAX)))) |
     |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1159:35
     |
1159 |         (&ty::TyUint(UintTy::U8), Integral(U8(::std::u8::MAX))) |
     |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1160:36
     |
1160 |         (&ty::TyUint(UintTy::U16), Integral(U16(::std::u16::MAX))) |
     |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1161:36
     |
1161 |         (&ty::TyUint(UintTy::U32), Integral(U32(::std::u32::MAX))) |
     |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1162:36
     |
1162 |         (&ty::TyUint(UintTy::U64), Integral(U64(::std::u64::MAX))) |
     |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1163:37
     |
1163 |         (&ty::TyUint(UintTy::U128), Integral(U128(::std::u128::MAX))) => Maximum,
     |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0308]: mismatched types
    --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/types.rs:1347:27
     |
1347 |         Ok(val) => if let Integral(const_int) = val {
     |                           ^^^^^^^^^^^^^^^^^^^ expected reference, found enum `rustc::middle::const_val::ConstVal`
     |
     = note: expected type `&rustc::ty::Const<'_>`
                found type `rustc::middle::const_val::ConstVal<'_>`

error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
  --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/vec.rs:61:25
   |
61 |     let snippet = match *vec_args {
   |                         ^^^^^^^^^
   |
note: first, the lifetime cannot outlive the anonymous lifetime #5 defined on the function body at 60:1...
  --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/vec.rs:60:1
   |
60 | / fn check_vec_macro(cx: &LateContext, vec_args: &higher::VecArgs, span: Span) {
61 | |     let snippet = match *vec_args {
62 | |         higher::VecArgs::Repeat(elem, len) => {
63 | |             let parent_item = cx.tcx.hir.get_parent(len.id);
...  |
91 | |     );
92 | | }
   | |_^
note: ...so that types are compatible (expected utils::higher::VecArgs<'_>, found utils::higher::VecArgs<'_>)
  --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/vec.rs:61:25
   |
61 |     let snippet = match *vec_args {
   |                         ^^^^^^^^^
note: but, the lifetime must be valid for the anonymous lifetime #3 defined on the function body at 60:1...
  --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/vec.rs:60:1
   |
60 | / fn check_vec_macro(cx: &LateContext, vec_args: &higher::VecArgs, span: Span) {
61 | |     let snippet = match *vec_args {
62 | |         higher::VecArgs::Repeat(elem, len) => {
63 | |             let parent_item = cx.tcx.hir.get_parent(len.id);
...  |
91 | |     );
92 | | }
   | |_^
note: ...so that expression is assignable (expected rustc::ty::TyCtxt<'_, '_, '_>, found rustc::ty::TyCtxt<'_, '_, '_>)
  --> /Users/asf/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.159/src/vec.rs:66:34
   |
66 |             if ConstContext::new(cx.tcx, cx.param_env.and(substs), cx.tables)
   |                                  ^^^^^^

error: aborting due to 55 previous errors

error: Could not compile `clippy_lints`.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `clippy v0.0.159`, intermediate artifacts can be found at `/var/folders/08/j4g_jn953lngpvgmyg8dygk00000gn/T/cargo-install.suGUmZzg5vWJ`

Caused by:
  build failed

I guess together with #2044 it's an exciting time to run clippy on nightly... (:

@oli-obk
Copy link
Contributor

oli-obk commented Sep 13, 2017

I won't get to this today, so if anyone would create a PR I would appreciate it. I can publish, i just don't have time to look into the actual fixing

@oli-obk oli-obk self-assigned this Sep 13, 2017
@oli-obk
Copy link
Contributor

oli-obk commented Sep 13, 2017

Nevermind, found some time.

@oli-obk
Copy link
Contributor

oli-obk commented Sep 13, 2017

Published as 0.0.160

@oli-obk oli-obk closed this as completed Sep 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants