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

Rustup to *1.9.0-nightly (c66d2380a 2016-03-15)* #773

Merged
merged 3 commits into from
Mar 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clippy"
version = "0.0.53"
version = "0.0.54"
authors = [
"Manish Goregaokar <manishsmail@gmail.com>",
"Andre Bogus <bogusandre@gmail.com>",
Expand Down
3 changes: 2 additions & 1 deletion src/escape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use rustc::lint::*;
use rustc::middle::expr_use_visitor::*;
use rustc::middle::infer;
use rustc::middle::mem_categorization::{cmt, Categorization};
use rustc::middle::traits::ProjectionMode;
use rustc::middle::ty::adjustment::AutoAdjustment;
use rustc::middle::ty;
use rustc::util::nodemap::NodeSet;
Expand Down Expand Up @@ -54,7 +55,7 @@ impl LintPass for EscapePass {
impl LateLintPass for EscapePass {
fn check_fn(&mut self, cx: &LateContext, _: visit::FnKind, decl: &FnDecl, body: &Block, _: Span, id: NodeId) {
let param_env = ty::ParameterEnvironment::for_item(cx.tcx, id);
let infcx = infer::new_infer_ctxt(cx.tcx, &cx.tcx.tables, Some(param_env));
let infcx = infer::new_infer_ctxt(cx.tcx, &cx.tcx.tables, Some(param_env), ProjectionMode::Any);
let mut v = EscapeDelegate {
cx: cx,
set: NodeSet(),
Expand Down
5 changes: 3 additions & 2 deletions src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use reexport::*;
use rustc::front::map::Node;
use rustc::lint::{LintContext, LateContext, Level, Lint};
use rustc::middle::def_id::DefId;
use rustc::middle::traits::ProjectionMode;
use rustc::middle::{cstore, def, infer, ty, traits};
use rustc::session::Session;
use rustc_front::hir::*;
Expand Down Expand Up @@ -269,7 +270,7 @@ pub fn implements_trait<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, ty: ty::Ty<'tcx>,
-> bool {
cx.tcx.populate_implementations_for_trait_if_necessary(trait_id);

let infcx = infer::new_infer_ctxt(cx.tcx, &cx.tcx.tables, None);
let infcx = infer::new_infer_ctxt(cx.tcx, &cx.tcx.tables, None, ProjectionMode::Any);
let obligation = traits::predicate_for_trait_def(cx.tcx,
traits::ObligationCause::dummy(),
trait_id,
Expand Down Expand Up @@ -753,6 +754,6 @@ pub fn return_ty(fun: ty::Ty) -> Option<ty::Ty> {
// FIXME: this works correctly for lifetimes bounds (`for <'a> Foo<'a>` == `for <'b> Foo<'b>` but
// not for type parameters.
pub fn same_tys<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, a: ty::Ty<'tcx>, b: ty::Ty<'tcx>) -> bool {
let infcx = infer::new_infer_ctxt(cx.tcx, &cx.tcx.tables, None);
let infcx = infer::new_infer_ctxt(cx.tcx, &cx.tcx.tables, None, ProjectionMode::Any);
infcx.can_equate(&cx.tcx.erase_regions(&a), &cx.tcx.erase_regions(&b)).is_ok()
}
1 change: 1 addition & 0 deletions tests/compile-fail/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#![deny(warnings)]
#![allow(dead_code)]
#![allow(unused_variables)] // Temporary fix for rustc false positive. To be removed.

use std::hash::{Hash, Hasher};

Expand Down