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

Build failure with nightly 2018-05-21 #2788

Closed
mati865 opened this issue May 22, 2018 · 4 comments
Closed

Build failure with nightly 2018-05-21 #2788

mati865 opened this issue May 22, 2018 · 4 comments

Comments

@mati865
Copy link
Contributor

mati865 commented May 22, 2018

There are at least three breaking PRs:
rust-lang/rust#50520
rust-lang/rust#50801
rust-lang/rust#50851

Clippy probably could benefit from some of those changes but it would require refactoring. I don't have enough experience/time to do it.

Click here for the build log
error[E0308]: mismatched types
   --> clippy_lints/src/utils/mod.rs:303:103
    |
303 |             .predicate_for_trait_def(cx.param_env, traits::ObligationCause::dummy(), trait_id, 0, ty, ty_params);
    |                                                                                                       ^^^^^^^^^ expected struct `rustc::ty::subst::Kind`, found reference
    |
    = note: expected type `&[rustc::ty::subst::Kind<'_>]`
               found type `&[&'tcx rustc::ty::TyS<'tcx>]`

error[E0308]: mismatched types
   --> clippy_lints/src/utils/hir_utils.rs:124:83
    |
124 |                 let mut celcx = constant_context(self.cx, self.cx.tcx.body_tables(ll_id));
    |                                                                                   ^^^^^ expected struct `rustc::hir::BodyId`, found struct `rustc::hir::AnonConst`
    |
    = note: expected type `rustc::hir::BodyId`
               found type `rustc::hir::AnonConst`

error[E0308]: mismatched types
   --> clippy_lints/src/utils/hir_utils.rs:125:59
    |
125 |                 let ll = celcx.expr(&self.cx.tcx.hir.body(ll_id).value);
    |                                                           ^^^^^ expected struct `rustc::hir::BodyId`, found struct `rustc::hir::AnonConst`
    |
    = note: expected type `rustc::hir::BodyId`
               found type `rustc::hir::AnonConst`

error[E0308]: mismatched types
   --> clippy_lints/src/utils/hir_utils.rs:126:83
    |
126 |                 let mut celcx = constant_context(self.cx, self.cx.tcx.body_tables(rl_id));
    |                                                                                   ^^^^^ expected struct `rustc::hir::BodyId`, found struct `rustc::hir::AnonConst`
    |
    = note: expected type `rustc::hir::BodyId`
               found type `rustc::hir::AnonConst`

error[E0308]: mismatched types
   --> clippy_lints/src/utils/hir_utils.rs:127:59
    |
127 |                 let rl = celcx.expr(&self.cx.tcx.hir.body(rl_id).value);
    |                                                           ^^^^^ expected struct `rustc::hir::BodyId`, found struct `rustc::hir::AnonConst`
    |
    = note: expected type `rustc::hir::BodyId`
               found type `rustc::hir::AnonConst`

error[E0308]: mismatched types
   --> clippy_lints/src/utils/hir_utils.rs:240:83
    |
240 |                 let mut celcx = constant_context(self.cx, self.cx.tcx.body_tables(ll_id));
    |                                                                                   ^^^^^ expected struct `rustc::hir::BodyId`, found struct `rustc::hir::AnonConst`
    |
    = note: expected type `rustc::hir::BodyId`
               found type `rustc::hir::AnonConst`

error[E0308]: mismatched types
   --> clippy_lints/src/utils/hir_utils.rs:241:55
    |
241 |                 self.tables = self.cx.tcx.body_tables(ll_id);
    |                                                       ^^^^^ expected struct `rustc::hir::BodyId`, found struct `rustc::hir::AnonConst`
    |
    = note: expected type `rustc::hir::BodyId`
               found type `rustc::hir::AnonConst`

error[E0308]: mismatched types
   --> clippy_lints/src/utils/hir_utils.rs:242:59
    |
242 |                 let ll = celcx.expr(&self.cx.tcx.hir.body(ll_id).value);
    |                                                           ^^^^^ expected struct `rustc::hir::BodyId`, found struct `rustc::hir::AnonConst`
    |
    = note: expected type `rustc::hir::BodyId`
               found type `rustc::hir::AnonConst`

error[E0308]: mismatched types
   --> clippy_lints/src/utils/hir_utils.rs:244:83
    |
244 |                 let mut celcx = constant_context(self.cx, self.cx.tcx.body_tables(rl_id));
    |                                                                                   ^^^^^ expected struct `rustc::hir::BodyId`, found struct `rustc::hir::AnonConst`
    |
    = note: expected type `rustc::hir::BodyId`
               found type `rustc::hir::AnonConst`

error[E0308]: mismatched types
   --> clippy_lints/src/utils/hir_utils.rs:245:55
    |
245 |                 self.tables = self.cx.tcx.body_tables(rl_id);
    |                                                       ^^^^^ expected struct `rustc::hir::BodyId`, found struct `rustc::hir::AnonConst`
    |
    = note: expected type `rustc::hir::BodyId`
               found type `rustc::hir::AnonConst`

error[E0308]: mismatched types
   --> clippy_lints/src/utils/hir_utils.rs:246:59
    |
246 |                 let rl = celcx.expr(&self.cx.tcx.hir.body(rl_id).value);
    |                                                           ^^^^^ expected struct `rustc::hir::BodyId`, found struct `rustc::hir::AnonConst`
    |
    = note: expected type `rustc::hir::BodyId`
               found type `rustc::hir::AnonConst`

error[E0308]: mismatched types
   --> clippy_lints/src/utils/hir_utils.rs:482:55
    |
482 |                 self.tables = self.cx.tcx.body_tables(l_id);
    |                                                       ^^^^ expected struct `rustc::hir::BodyId`, found struct `rustc::hir::AnonConst`
    |
    = note: expected type `rustc::hir::BodyId`
               found type `rustc::hir::AnonConst`

error[E0308]: mismatched types
   --> clippy_lints/src/utils/hir_utils.rs:483:54
    |
483 |                 self.hash_expr(&self.cx.tcx.hir.body(l_id).value);
    |                                                      ^^^^ expected struct `rustc::hir::BodyId`, found struct `rustc::hir::AnonConst`
    |
    = note: expected type `rustc::hir::BodyId`
               found type `rustc::hir::AnonConst`

error[E0308]: mismatched types
   --> clippy_lints/src/utils/inspector.rs:338:45
    |
338 |             print_expr(cx, &cx.tcx.hir.body(body_id).value, indent + 1);
    |                                             ^^^^^^^ expected struct `rustc::hir::BodyId`, found struct `rustc::hir::AnonConst`
    |
    = note: expected type `rustc::hir::BodyId`
               found type `rustc::hir::AnonConst`

error[E0308]: mismatched types
  --> clippy_lints/src/enum_clike.rs:55:60
   |
55 |                     let did = cx.tcx.hir.body_owner_def_id(body_id);
   |                                                            ^^^^^^^ expected struct `rustc::hir::BodyId`, found struct `rustc::hir::AnonConst`
   |
   = note: expected type `rustc::hir::BodyId`
              found type `rustc::hir::AnonConst`

error[E0308]: mismatched types
   --> clippy_lints/src/shadow.rs:353:45
    |
353 |             check_expr(cx, &cx.tcx.hir.body(body_id).value, bindings);
    |                                             ^^^^^^^ expected struct `rustc::hir::BodyId`, found struct `rustc::hir::AnonConst`
    |
    = note: expected type `rustc::hir::BodyId`
               found type `rustc::hir::AnonConst`

error[E0308]: mismatched types
   --> clippy_lints/src/shadow.rs:359:62
    |
359 |         TyTypeof(body_id) => check_expr(cx, &cx.tcx.hir.body(body_id).value, bindings),
    |                                                              ^^^^^^^ expected struct `rustc::hir::BodyId`, found struct `rustc::hir::AnonConst`
    |
    = note: expected type `rustc::hir::BodyId`
               found type `rustc::hir::AnonConst`

error: aborting due to 17 previous errors
mati865 added a commit to mati865/rust-clippy that referenced this issue May 22, 2018
Seriously this workaround is terrible, don't merge it
@mati865
Copy link
Contributor Author

mati865 commented May 22, 2018

If somebody wants working clippy ASAP you can use commit referenced above.
But beware, it was made in rush with 2 factors: compile and pass tests. No guarantees it won't start another world war, begin apocalypse or whatever else.

@phansch
Copy link
Member

phansch commented May 22, 2018

@mati865 Feel free to open a PR and see if the tests pass on Travis and AppVeyor, if they do it's probably fine :)

@ithamsteri
Copy link

ithamsteri commented May 22, 2018

I have problem too. Last test build of Travis CI used version 1.28.0-nightly (a1d4a9503 2018-05-20), but I have 1.28.0-nightly (cb20f68d0 2018-05-21) and not build clippy.

mati865 added a commit to mati865/rust-clippy that referenced this issue May 23, 2018
Seriously this workaround is terrible, don't merge it
mati865 added a commit to mati865/rust-clippy that referenced this issue May 23, 2018
@oli-obk
Copy link
Contributor

oli-obk commented May 23, 2018

published as 0.0.204

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

4 participants