diff --git a/CHANGELOG.md b/CHANGELOG.md index 7723b5583..185072deb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ # Change Log All notable changes to this project will be documented in this file. -## 0.0.86 — ? +## 0.0.86 — 2016-08-28 +* Rustup to *rustc 1.13.0-nightly (a23064af5 2016-08-27)* * New lints: [`missing_docs_in_private_items`], [`zero_prefixed_literal`] ## 0.0.85 — 2016-08-19 diff --git a/Cargo.toml b/Cargo.toml index 89974572e..78c4b285f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clippy" -version = "0.0.85" +version = "0.0.86" authors = [ "Manish Goregaokar ", "Andre Bogus ", @@ -25,7 +25,7 @@ test = false [dependencies] # begin automatic update -clippy_lints = { version = "0.0.85", path = "clippy_lints" } +clippy_lints = { version = "0.0.86", path = "clippy_lints" } # end automatic update [dev-dependencies] diff --git a/clippy_lints/Cargo.toml b/clippy_lints/Cargo.toml index 6f6f09d1e..f629e1deb 100644 --- a/clippy_lints/Cargo.toml +++ b/clippy_lints/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "clippy_lints" # begin automatic update -version = "0.0.85" +version = "0.0.86" # end automatic update authors = [ "Manish Goregaokar ", diff --git a/clippy_lints/src/derive.rs b/clippy_lints/src/derive.rs index 2a0fca63e..a5f3b1c12 100644 --- a/clippy_lints/src/derive.rs +++ b/clippy_lints/src/derive.rs @@ -107,7 +107,7 @@ fn check_hash_peq<'a, 'tcx: 'a>(cx: &LateContext<'a, 'tcx>, span: Span, trait_re // Only care about `impl PartialEq for Foo` // For `impl PartialEq for A, input_types is [A, B] - if trait_ref.input_types()[1] == ty { + if trait_ref.substs.type_at(1) == ty { let mess = if peq_is_automatically_derived { "you are implementing `Hash` explicitly but have derived `PartialEq`" } else { diff --git a/clippy_lints/src/escape.rs b/clippy_lints/src/escape.rs index 2e7cd04d7..30c7e067d 100644 --- a/clippy_lints/src/escape.rs +++ b/clippy_lints/src/escape.rs @@ -144,7 +144,7 @@ impl<'a, 'tcx: 'a+'gcx, 'gcx: 'a> Delegate<'tcx> for EscapeDelegate<'a, 'tcx, 'g } } - fn borrow(&mut self, borrow_id: NodeId, _: Span, cmt: cmt<'tcx>, _: ty::Region, _: ty::BorrowKind, + fn borrow(&mut self, borrow_id: NodeId, _: Span, cmt: cmt<'tcx>, _: &ty::Region, _: ty::BorrowKind, loan_cause: LoanCause) { if let Categorization::Local(lid) = cmt.cat { diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index 39d2c6b5f..c5ce53e66 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -8,7 +8,6 @@ #![feature(rustc_private)] #![feature(slice_patterns)] #![feature(stmt_expr_attributes)] -#![feature(type_macros)] #![allow(indexing_slicing, shadow_reuse, unknown_lints, missing_docs_in_private_items)] diff --git a/clippy_lints/src/methods.rs b/clippy_lints/src/methods.rs index 0dc6d5a3b..02366c4a5 100644 --- a/clippy_lints/src/methods.rs +++ b/clippy_lints/src/methods.rs @@ -1083,12 +1083,12 @@ fn get_error_type<'a>(cx: &LateContext, ty: ty::Ty<'a>) -> Option> { if !match_type(cx, ty, &paths::RESULT) { return None; } + if let ty::TyEnum(_, substs) = ty.sty { - if let Some(err_ty) = substs.types.get(1) { - return Some(err_ty); - } + substs.types().nth(1) + } else { + None } - None } /// This checks whether a given type is known to implement Debug. diff --git a/clippy_lints/src/mutex_atomic.rs b/clippy_lints/src/mutex_atomic.rs index 9cd17a07d..db2c003b6 100644 --- a/clippy_lints/src/mutex_atomic.rs +++ b/clippy_lints/src/mutex_atomic.rs @@ -59,7 +59,7 @@ impl LateLintPass for MutexAtomic { let ty = cx.tcx.expr_ty(expr); if let ty::TyStruct(_, subst) = ty.sty { if match_type(cx, ty, &paths::MUTEX) { - let mutex_param = &subst.types[0].sty; + let mutex_param = &subst.type_at(0).sty; if let Some(atomic_name) = get_atomic_name(mutex_param) { let msg = format!("Consider using an {} instead of a Mutex here. If you just want the locking \ behaviour and not the internal type, consider using Mutex<()>.", diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index c458bb1df..9e9ff65ac 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -279,7 +279,7 @@ pub fn implements_trait<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, ty: ty::Ty<'tcx>, trait_id, 0, ty, - ty_params); + &ty_params); traits::SelectionContext::new(&infcx).evaluate_obligation_conservatively(&obligation) }) diff --git a/clippy_lints/src/vec.rs b/clippy_lints/src/vec.rs index 6943cb2a8..053cc69d7 100644 --- a/clippy_lints/src/vec.rs +++ b/clippy_lints/src/vec.rs @@ -89,7 +89,7 @@ fn check_vec_macro(cx: &LateContext, vec_args: &higher::VecArgs, span: Span) { /// Return the item type of the vector (ie. the `T` in `Vec`). fn vec_type(ty: ty::Ty) -> ty::Ty { if let ty::TyStruct(_, substs) = ty.sty { - substs.types[0] + substs.type_at(0) } else { panic!("The type of `vec!` is a not a struct?"); }