Skip to content

Commit b700266

Browse files
---
yaml --- r: 274837 b: refs/heads/stable c: fbeb679 h: refs/heads/master i: 274835: 1a40e60
1 parent 69a3243 commit b700266

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 65b38f304d63a39d1a03a09381135d399c2f4e78
32+
refs/heads/stable: fbeb67985df7fadfb01dd2e3b0defe2fa0dfd9d4
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/librustc_lint/types.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl LateLintPass for TypeLimits {
125125
}
126126
},
127127
hir::ExprBinary(binop, ref l, ref r) => {
128-
if is_comparison(binop) && !check_limits(cx.tcx, binop, &**l, &**r) {
128+
if is_comparison(binop) && !check_limits(cx.tcx, binop, &l, &r) {
129129
cx.span_lint(UNUSED_COMPARISONS, e.span,
130130
"comparison is useless due to type limits");
131131
}
@@ -174,7 +174,7 @@ impl LateLintPass for TypeLimits {
174174
if (negative && v > max as u64 + 1) ||
175175
(!negative && v > max as u64) {
176176
cx.span_lint(OVERFLOWING_LITERALS, e.span,
177-
&*format!("literal out of range for {:?}", t));
177+
&format!("literal out of range for {:?}", t));
178178
return;
179179
}
180180
}
@@ -196,7 +196,7 @@ impl LateLintPass for TypeLimits {
196196
};
197197
if lit_val < min || lit_val > max {
198198
cx.span_lint(OVERFLOWING_LITERALS, e.span,
199-
&*format!("literal out of range for {:?}", t));
199+
&format!("literal out of range for {:?}", t));
200200
}
201201
},
202202
ty::TyFloat(t) => {
@@ -213,7 +213,7 @@ impl LateLintPass for TypeLimits {
213213
};
214214
if lit_val < min || lit_val > max {
215215
cx.span_lint(OVERFLOWING_LITERALS, e.span,
216-
&*format!("literal out of range for {:?}", t));
216+
&format!("literal out of range for {:?}", t));
217217
}
218218
},
219219
_ => ()
@@ -666,7 +666,7 @@ impl LateLintPass for ImproperCTypes {
666666

667667
fn check_foreign_fn(cx: &LateContext, decl: &hir::FnDecl) {
668668
for input in &decl.inputs {
669-
check_ty(cx, &*input.ty);
669+
check_ty(cx, &input.ty);
670670
}
671671
if let hir::Return(ref ret_ty) = decl.output {
672672
let tty = ast_ty_to_normalized(cx.tcx, ret_ty.id);
@@ -680,8 +680,8 @@ impl LateLintPass for ImproperCTypes {
680680
if nmod.abi != Abi::RustIntrinsic && nmod.abi != Abi::PlatformIntrinsic {
681681
for ni in &nmod.items {
682682
match ni.node {
683-
hir::ForeignItemFn(ref decl, _) => check_foreign_fn(cx, &**decl),
684-
hir::ForeignItemStatic(ref t, _) => check_ty(cx, &**t)
683+
hir::ForeignItemFn(ref decl, _) => check_foreign_fn(cx, &decl),
684+
hir::ForeignItemStatic(ref t, _) => check_ty(cx, &t)
685685
}
686686
}
687687
}

branches/stable/src/librustc_lint/unused.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ impl LateLintPass for UnusedAttributes {
248248

249249
let plugin_attributes = cx.sess().plugin_attributes.borrow_mut();
250250
for &(ref name, ty) in plugin_attributes.iter() {
251-
if ty == AttributeType::Whitelisted && attr.check_name(&*name) {
251+
if ty == AttributeType::Whitelisted && attr.check_name(&name) {
252252
break;
253253
}
254254
}
@@ -265,7 +265,7 @@ impl LateLintPass for UnusedAttributes {
265265
// the crate level?
266266
let plugin_crate = plugin_attributes.iter()
267267
.find(|&&(ref x, t)| {
268-
&*attr.name() == &*x &&
268+
&*attr.name() == x &&
269269
AttributeType::CrateLevel == t
270270
}).is_some();
271271
if known_crate || plugin_crate {
@@ -294,7 +294,7 @@ impl UnusedParens {
294294
fn check_unused_parens_core(&self, cx: &EarlyContext, value: &ast::Expr, msg: &str,
295295
struct_lit_needs_parens: bool) {
296296
if let ast::ExprKind::Paren(ref inner) = value.node {
297-
let necessary = struct_lit_needs_parens && contains_exterior_struct_lit(&**inner);
297+
let necessary = struct_lit_needs_parens && contains_exterior_struct_lit(&inner);
298298
if !necessary {
299299
cx.span_lint(UNUSED_PARENS, value.span,
300300
&format!("unnecessary parentheses around {}", msg))
@@ -314,8 +314,8 @@ impl UnusedParens {
314314
ast::ExprKind::AssignOp(_, ref lhs, ref rhs) |
315315
ast::ExprKind::Binary(_, ref lhs, ref rhs) => {
316316
// X { y: 1 } + X { y: 2 }
317-
contains_exterior_struct_lit(&**lhs) ||
318-
contains_exterior_struct_lit(&**rhs)
317+
contains_exterior_struct_lit(&lhs) ||
318+
contains_exterior_struct_lit(&rhs)
319319
}
320320
ast::ExprKind::Unary(_, ref x) |
321321
ast::ExprKind::Cast(ref x, _) |
@@ -324,12 +324,12 @@ impl UnusedParens {
324324
ast::ExprKind::TupField(ref x, _) |
325325
ast::ExprKind::Index(ref x, _) => {
326326
// &X { y: 1 }, X { y: 1 }.y
327-
contains_exterior_struct_lit(&**x)
327+
contains_exterior_struct_lit(&x)
328328
}
329329

330330
ast::ExprKind::MethodCall(_, _, ref exprs) => {
331331
// X { y: 1 }.bar(...)
332-
contains_exterior_struct_lit(&*exprs[0])
332+
contains_exterior_struct_lit(&exprs[0])
333333
}
334334

335335
_ => false
@@ -360,7 +360,7 @@ impl EarlyLintPass for UnusedParens {
360360
InPlace(_, ref value) => (value, "emplacement value", false),
361361
_ => return
362362
};
363-
self.check_unused_parens_core(cx, &**value, msg, struct_lit_needs_parens);
363+
self.check_unused_parens_core(cx, &value, msg, struct_lit_needs_parens);
364364
}
365365

366366
fn check_stmt(&mut self, cx: &EarlyContext, s: &ast::Stmt) {
@@ -374,7 +374,7 @@ impl EarlyLintPass for UnusedParens {
374374
},
375375
_ => return
376376
};
377-
self.check_unused_parens_core(cx, &**value, msg, false);
377+
self.check_unused_parens_core(cx, &value, msg, false);
378378
}
379379
}
380380

0 commit comments

Comments
 (0)