Skip to content

Commit fe1ded0

Browse files
committed
Merge pull request #773 from mcarton/rustup
Rustup to *1.9.0-nightly (c66d238 2016-03-15)*
2 parents 9e2aab0 + 0323d0b commit fe1ded0

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy"
3-
version = "0.0.53"
3+
version = "0.0.54"
44
authors = [
55
"Manish Goregaokar <[email protected]>",
66
"Andre Bogus <[email protected]>",

src/escape.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use rustc::lint::*;
33
use rustc::middle::expr_use_visitor::*;
44
use rustc::middle::infer;
55
use rustc::middle::mem_categorization::{cmt, Categorization};
6+
use rustc::middle::traits::ProjectionMode;
67
use rustc::middle::ty::adjustment::AutoAdjustment;
78
use rustc::middle::ty;
89
use rustc::util::nodemap::NodeSet;
@@ -54,7 +55,7 @@ impl LintPass for EscapePass {
5455
impl LateLintPass for EscapePass {
5556
fn check_fn(&mut self, cx: &LateContext, _: visit::FnKind, decl: &FnDecl, body: &Block, _: Span, id: NodeId) {
5657
let param_env = ty::ParameterEnvironment::for_item(cx.tcx, id);
57-
let infcx = infer::new_infer_ctxt(cx.tcx, &cx.tcx.tables, Some(param_env));
58+
let infcx = infer::new_infer_ctxt(cx.tcx, &cx.tcx.tables, Some(param_env), ProjectionMode::Any);
5859
let mut v = EscapeDelegate {
5960
cx: cx,
6061
set: NodeSet(),

src/utils/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use reexport::*;
22
use rustc::front::map::Node;
33
use rustc::lint::{LintContext, LateContext, Level, Lint};
44
use rustc::middle::def_id::DefId;
5+
use rustc::middle::traits::ProjectionMode;
56
use rustc::middle::{cstore, def, infer, ty, traits};
67
use rustc::session::Session;
78
use rustc_front::hir::*;
@@ -269,7 +270,7 @@ pub fn implements_trait<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, ty: ty::Ty<'tcx>,
269270
-> bool {
270271
cx.tcx.populate_implementations_for_trait_if_necessary(trait_id);
271272

272-
let infcx = infer::new_infer_ctxt(cx.tcx, &cx.tcx.tables, None);
273+
let infcx = infer::new_infer_ctxt(cx.tcx, &cx.tcx.tables, None, ProjectionMode::Any);
273274
let obligation = traits::predicate_for_trait_def(cx.tcx,
274275
traits::ObligationCause::dummy(),
275276
trait_id,
@@ -773,6 +774,6 @@ pub fn return_ty(fun: ty::Ty) -> Option<ty::Ty> {
773774
// FIXME: this works correctly for lifetimes bounds (`for <'a> Foo<'a>` == `for <'b> Foo<'b>` but
774775
// not for type parameters.
775776
pub fn same_tys<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, a: ty::Ty<'tcx>, b: ty::Ty<'tcx>) -> bool {
776-
let infcx = infer::new_infer_ctxt(cx.tcx, &cx.tcx.tables, None);
777+
let infcx = infer::new_infer_ctxt(cx.tcx, &cx.tcx.tables, None, ProjectionMode::Any);
777778
infcx.can_equate(&cx.tcx.erase_regions(&a), &cx.tcx.erase_regions(&b)).is_ok()
778779
}

tests/compile-fail/derive.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

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

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

0 commit comments

Comments
 (0)