We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a4198c1 + 1c035f7 commit 9936734Copy full SHA for 9936734
CHANGELOG.md
@@ -1,7 +1,8 @@
1
# Change Log
2
All notable changes to this project will be documented in this file.
3
4
-## 0.0.93 — ?
+## 0.0.93 — 2016-10-03
5
+* Rustup to *rustc 1.14.0-nightly (144af3e97 2016-10-02)*
6
* [`option_map_unwrap_or`] and [`option_map_unwrap_or_else`] are now
7
allowed by default.
8
* New lint: [`explicit_into_iter_loop`]
Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "clippy"
-version = "0.0.92"
+version = "0.0.93"
authors = [
"Manish Goregaokar <[email protected]>",
"Andre Bogus <[email protected]>",
@@ -25,7 +25,7 @@ test = false
25
26
[dependencies]
27
# begin automatic update
28
-clippy_lints = { version = "0.0.92", path = "clippy_lints" }
+clippy_lints = { version = "0.0.93", path = "clippy_lints" }
29
# end automatic update
30
31
[dev-dependencies]
clippy_lints/Cargo.toml
@@ -1,7 +1,7 @@
name = "clippy_lints"
clippy_lints/src/array_indexing.rs
@@ -1,10 +1,10 @@
use rustc::lint::*;
use rustc::middle::const_val::ConstVal;
-use rustc::ty::TyArray;
+use rustc::ty;
use rustc_const_eval::EvalHint::ExprTypeChecked;
use rustc_const_eval::eval_const_expr_partial;
use rustc_const_math::ConstInt;
-use rustc::hir::*;
+use rustc::hir;
use syntax::ast::RangeLimits;
9
use utils::{self, higher};
10
@@ -56,11 +56,11 @@ impl LintPass for ArrayIndexing {
56
}
57
58
impl LateLintPass for ArrayIndexing {
59
- fn check_expr(&mut self, cx: &LateContext, e: &Expr) {
60
- if let ExprIndex(ref array, ref index) = e.node {
+ fn check_expr(&mut self, cx: &LateContext, e: &hir::Expr) {
+ if let hir::ExprIndex(ref array, ref index) = e.node {
61
// Array with known size can be checked statically
62
let ty = cx.tcx.expr_ty(array);
63
- if let TyArray(_, size) = ty.sty {
+ if let ty::TyArray(_, size) = ty.sty {
64
let size = ConstInt::Infer(size as u64);
65
66
// Index is a constant uint
clippy_lints/src/consts.rs
@@ -257,7 +257,7 @@ impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> {
257
ExprBlock(ref block) => self.block(block),
258
ExprIf(ref cond, ref then, ref otherwise) => self.ifthenelse(cond, then, otherwise),
259
ExprLit(ref lit) => Some(lit_to_constant(&lit.node)),
260
- ExprVec(ref vec) => self.multi(vec).map(Constant::Vec),
+ ExprArray(ref vec) => self.multi(vec).map(Constant::Vec),
261
ExprTup(ref tup) => self.multi(tup).map(Constant::Tuple),
262
ExprRepeat(ref value, ref number) => {
263
self.binop_apply(value, number, |v, n| Some(Constant::Repeat(Box::new(v), n.as_u64() as usize)))
clippy_lints/src/copies.rs
@@ -265,7 +265,7 @@ fn bindings<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, pat: &Pat) -> HashMap<Interned
265
bindings_impl(cx, pat, map);
266
267
268
- PatKind::Vec(ref lhs, ref mid, ref rhs) => {
+ PatKind::Slice(ref lhs, ref mid, ref rhs) => {
269
for pat in lhs {
270
271
clippy_lints/src/eval_order_dependence.rs
@@ -213,7 +213,7 @@ fn check_expr<'v, 't>(vis: & mut ReadVisitor<'v, 't>, expr: &'v Expr) -> StopEar
213
214
215
match expr.node {
216
- ExprVec(_) |
+ ExprArray(_) |
217
ExprTup(_) |
218
ExprMethodCall(_, _, _) |
219
ExprCall(_, _) |
clippy_lints/src/format.rs
@@ -82,7 +82,7 @@ pub fn get_argument_fmtstr_parts<'a, 'b>(cx: &LateContext<'a, 'b>, expr: &'a Exp
82
decl.name.as_str() == "__STATIC_FMTSTR",
83
let ItemStatic(_, _, ref expr) = decl.node,
84
let ExprAddrOf(_, ref expr) = expr.node, // &["…", "…", …]
85
- let ExprVec(ref exprs) = expr.node,
+ let ExprArray(ref exprs) = expr.node,
86
], {
87
let mut result = Vec::new();
88
for expr in exprs {
@@ -123,7 +123,7 @@ fn check_arg_is_display(cx: &LateContext, expr: &Expr) -> bool {
123
arms[0].pats.len() == 1,
124
let PatKind::Tuple(ref pat, None) = arms[0].pats[0].node,
125
pat.len() == 1,
126
- let ExprVec(ref exprs) = arms[0].body.node,
+ let ExprArray(ref exprs) = arms[0].body.node,
127
exprs.len() == 1,
128
let ExprCall(_, ref args) = exprs[0].node,
129
args.len() == 2,
clippy_lints/src/no_effect.rs
@@ -50,7 +50,7 @@ fn has_no_effect(cx: &LateContext, expr: &Expr) -> bool {
50
Expr_::ExprPath(..) => true,
51
Expr_::ExprIndex(ref a, ref b) |
52
Expr_::ExprBinary(_, ref a, ref b) => has_no_effect(cx, a) && has_no_effect(cx, b),
53
- Expr_::ExprVec(ref v) |
+ Expr_::ExprArray(ref v) |
54
Expr_::ExprTup(ref v) => v.iter().all(|val| has_no_effect(cx, val)),
55
Expr_::ExprRepeat(ref inner, _) |
Expr_::ExprCast(ref inner, _) |
@@ -130,7 +130,7 @@ fn reduce_expression<'a>(cx: &LateContext, expr: &'a Expr) -> Option<Vec<&'a Exp
130
131
132
Expr_::ExprBinary(_, ref a, ref b) => Some(vec![&**a, &**b]),
133
134
Expr_::ExprTup(ref v) => Some(v.iter().map(Deref::deref).collect()),
135
136
clippy_lints/src/regex.rs
@@ -190,7 +190,7 @@ fn is_trivial_regex(s: ®ex_syntax::Expr) -> Option<&'static str> {
190
fn check_set(cx: &LateContext, expr: &Expr, utf8: bool) {
191
if_let_chain! {[
192
let ExprAddrOf(_, ref expr) = expr.node,
193
194
195
196
check_regex(cx, expr, utf8);
0 commit comments