Skip to content

Commit 0377086

Browse files
committed
---
yaml --- r: 191543 b: refs/heads/try c: b8c75e5 h: refs/heads/master i: 191541: 7d6c798 191539: 359835a 191535: 892e118 v: v3
1 parent 865ed8a commit 0377086

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
@@ -2,7 +2,7 @@
22
refs/heads/master: 809a554fca2d0ebc2ba50077016fe282a4064752
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: c64d671671aea2e44ee7fc6eb00ee75fc30ed7b9
5-
refs/heads/try: a41d32f560641995b5f6d28cf0e2be19cb61caea
5+
refs/heads/try: b8c75e5cdf0e28e25666459b8d61588f83730dff
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/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/try/src/librustc_lint/lib.rs

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

0 commit comments

Comments
 (0)