Skip to content

Commit 7d13901

Browse files
committed
---
yaml --- r: 155416 b: refs/heads/try2 c: 034f69e h: refs/heads/master v: v3
1 parent 4528bdb commit 7d13901

File tree

3 files changed

+1
-42
lines changed

3 files changed

+1
-42
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 62e5dc929c1e8535d4185073507e681f26ab7e6a
8+
refs/heads/try2: 034f69ec4bd4ee59843ead5f40c5b3936a8eab4f
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/diagnostics.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ register_diagnostics!(
150150
E0144,
151151
E0145,
152152
E0146,
153-
E0151,
154153
E0152,
155154
E0153,
156155
E0154,

branches/try2/src/librustc/middle/kind.rs

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use util::ppaux::UserString;
1515

1616
use syntax::ast::*;
1717
use syntax::codemap::Span;
18-
use syntax::print::pprust::{ident_to_string};
1918
use syntax::visit::Visitor;
2019
use syntax::visit;
2120

@@ -39,10 +38,6 @@ impl<'a, 'tcx, 'v> Visitor<'v> for Context<'a, 'tcx> {
3938
fn visit_ty(&mut self, t: &Ty) {
4039
check_ty(self, t);
4140
}
42-
43-
fn visit_pat(&mut self, p: &Pat) {
44-
check_pat(self, p);
45-
}
4641
}
4742

4843
pub fn check_crate(tcx: &ty::ctxt) {
@@ -239,38 +234,3 @@ pub fn check_freevar_bounds(cx: &Context, fn_span: Span, sp: Span, ty: ty::t,
239234
});
240235
}
241236

242-
// Ensure that `ty` has a statically known size (i.e., it has the `Sized` bound).
243-
fn check_sized(tcx: &ty::ctxt, ty: ty::t, name: String, sp: Span) {
244-
if !ty::type_is_sized(tcx, ty) {
245-
span_err!(tcx.sess, sp, E0151,
246-
"variable `{}` has dynamically sized type `{}`",
247-
name, ty_to_string(tcx, ty));
248-
}
249-
}
250-
251-
// Check that any variables in a pattern have types with statically known size.
252-
fn check_pat(cx: &mut Context, pat: &Pat) {
253-
let var_name = match pat.node {
254-
PatWild(PatWildSingle) => Some("_".to_string()),
255-
PatIdent(_, ref path1, _) => Some(ident_to_string(&path1.node).to_string()),
256-
_ => None
257-
};
258-
259-
match var_name {
260-
Some(name) => {
261-
let types = cx.tcx.node_types.borrow();
262-
let ty = types.find(&(pat.id as uint));
263-
match ty {
264-
Some(ty) => {
265-
debug!("kind: checking sized-ness of variable {}: {}",
266-
name, ty_to_string(cx.tcx, *ty));
267-
check_sized(cx.tcx, *ty, name, pat.span);
268-
}
269-
None => {} // extern fn args
270-
}
271-
}
272-
None => {}
273-
}
274-
275-
visit::walk_pat(cx, pat);
276-
}

0 commit comments

Comments
 (0)