mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-07 12:33:14 +00:00
Merge pull request #773 from mcarton/rustup
Rustup to *1.9.0-nightly (c66d2380a
2016-03-15)*
This commit is contained in:
commit
fe1ded0228
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "clippy"
|
name = "clippy"
|
||||||
version = "0.0.53"
|
version = "0.0.54"
|
||||||
authors = [
|
authors = [
|
||||||
"Manish Goregaokar <manishsmail@gmail.com>",
|
"Manish Goregaokar <manishsmail@gmail.com>",
|
||||||
"Andre Bogus <bogusandre@gmail.com>",
|
"Andre Bogus <bogusandre@gmail.com>",
|
||||||
|
@ -3,6 +3,7 @@ use rustc::lint::*;
|
|||||||
use rustc::middle::expr_use_visitor::*;
|
use rustc::middle::expr_use_visitor::*;
|
||||||
use rustc::middle::infer;
|
use rustc::middle::infer;
|
||||||
use rustc::middle::mem_categorization::{cmt, Categorization};
|
use rustc::middle::mem_categorization::{cmt, Categorization};
|
||||||
|
use rustc::middle::traits::ProjectionMode;
|
||||||
use rustc::middle::ty::adjustment::AutoAdjustment;
|
use rustc::middle::ty::adjustment::AutoAdjustment;
|
||||||
use rustc::middle::ty;
|
use rustc::middle::ty;
|
||||||
use rustc::util::nodemap::NodeSet;
|
use rustc::util::nodemap::NodeSet;
|
||||||
@ -54,7 +55,7 @@ impl LintPass for EscapePass {
|
|||||||
impl LateLintPass for EscapePass {
|
impl LateLintPass for EscapePass {
|
||||||
fn check_fn(&mut self, cx: &LateContext, _: visit::FnKind, decl: &FnDecl, body: &Block, _: Span, id: NodeId) {
|
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 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 {
|
let mut v = EscapeDelegate {
|
||||||
cx: cx,
|
cx: cx,
|
||||||
set: NodeSet(),
|
set: NodeSet(),
|
||||||
|
@ -2,6 +2,7 @@ use reexport::*;
|
|||||||
use rustc::front::map::Node;
|
use rustc::front::map::Node;
|
||||||
use rustc::lint::{LintContext, LateContext, Level, Lint};
|
use rustc::lint::{LintContext, LateContext, Level, Lint};
|
||||||
use rustc::middle::def_id::DefId;
|
use rustc::middle::def_id::DefId;
|
||||||
|
use rustc::middle::traits::ProjectionMode;
|
||||||
use rustc::middle::{cstore, def, infer, ty, traits};
|
use rustc::middle::{cstore, def, infer, ty, traits};
|
||||||
use rustc::session::Session;
|
use rustc::session::Session;
|
||||||
use rustc_front::hir::*;
|
use rustc_front::hir::*;
|
||||||
@ -269,7 +270,7 @@ pub fn implements_trait<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, ty: ty::Ty<'tcx>,
|
|||||||
-> bool {
|
-> bool {
|
||||||
cx.tcx.populate_implementations_for_trait_if_necessary(trait_id);
|
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,
|
let obligation = traits::predicate_for_trait_def(cx.tcx,
|
||||||
traits::ObligationCause::dummy(),
|
traits::ObligationCause::dummy(),
|
||||||
trait_id,
|
trait_id,
|
||||||
@ -773,6 +774,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
|
// FIXME: this works correctly for lifetimes bounds (`for <'a> Foo<'a>` == `for <'b> Foo<'b>` but
|
||||||
// not for type parameters.
|
// not for type parameters.
|
||||||
pub fn same_tys<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, a: ty::Ty<'tcx>, b: ty::Ty<'tcx>) -> bool {
|
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()
|
infcx.can_equate(&cx.tcx.erase_regions(&a), &cx.tcx.erase_regions(&b)).is_ok()
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#![deny(warnings)]
|
#![deny(warnings)]
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
#![allow(unused_variables)] // Temporary fix for rustc false positive. To be removed.
|
||||||
|
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user