Skip to content

Commit fb73d1c

Browse files
committed
---
yaml --- r: 192286 b: refs/heads/master c: 088cd56 h: refs/heads/master v: v3
1 parent 78ae491 commit fb73d1c

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
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 9374c216f6040189301aeb043d317c12ffb17a0b
2+
refs/heads/master: 088cd566ea87c90a9c765a113a2310d60849e7c1
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a923278c6278c63468d74772c58dbf788e88f58c
55
refs/heads/try: ce76bff75603a754d092456285ff455eb871633d

trunk/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,

trunk/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)