Skip to content

Commit 4ab5338

Browse files
committed
---
yaml --- r: 192497 b: refs/heads/auto c: 088cd56 h: refs/heads/master i: 192495: 5329392 v: v3
1 parent 046e97b commit 4ab5338

File tree

3 files changed

+1
-26
lines changed

3 files changed

+1
-26
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 9374c216f6040189301aeb043d317c12ffb17a0b
13+
refs/heads/auto: 088cd566ea87c90a9c765a113a2310d60849e7c1
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/librustc_lint/builtin.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -84,30 +84,6 @@ impl LintPass for WhileTrue {
8484
}
8585
}
8686

87-
declare_lint! {
88-
UNUSED_TYPECASTS,
89-
Allow,
90-
"detects unnecessary type casts that can be removed"
91-
}
92-
93-
#[derive(Copy)]
94-
pub struct UnusedCasts;
95-
96-
impl LintPass for UnusedCasts {
97-
fn get_lints(&self) -> LintArray {
98-
lint_array!(UNUSED_TYPECASTS)
99-
}
100-
101-
fn check_expr(&mut self, cx: &Context, e: &ast::Expr) {
102-
if let ast::ExprCast(ref expr, ref ty) = e.node {
103-
let t_t = ty::expr_ty(cx.tcx, e);
104-
if ty::expr_ty(cx.tcx, &**expr) == t_t {
105-
cx.span_lint(UNUSED_TYPECASTS, ty.span, "unnecessary type cast");
106-
}
107-
}
108-
}
109-
}
110-
11187
declare_lint! {
11288
UNSIGNED_NEGATION,
11389
Warn,

branches/auto/src/librustc_lint/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
8989
add_builtin!(sess,
9090
HardwiredLints,
9191
WhileTrue,
92-
UnusedCasts,
9392
ImproperCTypes,
9493
BoxPointers,
9594
UnusedAttributes,

0 commit comments

Comments
 (0)