mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-16 17:58:14 +00:00
Merge pull request #1201 from Manishearth/rustup
Rustup to a23064af5 2016-08-27 and bump to 0.0.86
This commit is contained in:
commit
d8a50f5da4
10 changed files with 14 additions and 14 deletions
|
@ -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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "clippy"
|
||||
version = "0.0.85"
|
||||
version = "0.0.86"
|
||||
authors = [
|
||||
"Manish Goregaokar <manishsmail@gmail.com>",
|
||||
"Andre Bogus <bogusandre@gmail.com>",
|
||||
|
@ -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]
|
||||
|
|
|
@ -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 <manishsmail@gmail.com>",
|
||||
|
|
|
@ -107,7 +107,7 @@ fn check_hash_peq<'a, 'tcx: 'a>(cx: &LateContext<'a, 'tcx>, span: Span, trait_re
|
|||
|
||||
// Only care about `impl PartialEq<Foo> for Foo`
|
||||
// For `impl PartialEq<B> 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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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)]
|
||||
|
||||
|
|
|
@ -1083,12 +1083,12 @@ fn get_error_type<'a>(cx: &LateContext, ty: ty::Ty<'a>) -> Option<ty::Ty<'a>> {
|
|||
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.
|
||||
|
|
|
@ -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<()>.",
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
|
|
|
@ -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<T>`).
|
||||
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?");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue