Skip to content

Commit fb236b0

Browse files
committed
Merge branch 'master' of github.com:mozilla/rust
2 parents f7d756f + 45c1dfe commit fb236b0

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

src/comp/middle/tstate/pre_post_conditions.rs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,7 @@ fn find_pre_post_method(ccx: crate_ctxt, m: @method) {
4141
fn find_pre_post_item(ccx: crate_ctxt, i: item) {
4242
alt i.node {
4343
item_const(_, e) {
44-
// make a fake fcx
45-
let v: @mutable [node_id] = @mutable [];
46-
let fake_fcx =
47-
{
48-
// just bogus
49-
enclosing:
50-
{constrs: new_def_hash::<constraint>(),
51-
num_constraints: 0u,
52-
cf: return_val,
53-
i_return: ninit(0, ""),
54-
i_diverge: ninit(0, ""),
55-
used_vars: v},
56-
id: 0,
57-
name: "",
58-
ccx: ccx};
59-
find_pre_post_expr(fake_fcx, e);
44+
// do nothing -- item_consts don't refer to local vars
6045
}
6146
item_fn(_, _, body) {
6247
assert (ccx.fm.contains_key(i.id));

src/test/run-pass/issue-1660.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
const _x: int = 1<<2;
3+
}

0 commit comments

Comments
 (0)