Merge branch 'master' of github.com:mozilla/rust
This commit is contained in:
commit
fb236b0bb6
2 changed files with 4 additions and 16 deletions
|
@ -41,22 +41,7 @@ fn find_pre_post_method(ccx: crate_ctxt, m: @method) {
|
||||||
fn find_pre_post_item(ccx: crate_ctxt, i: item) {
|
fn find_pre_post_item(ccx: crate_ctxt, i: item) {
|
||||||
alt i.node {
|
alt i.node {
|
||||||
item_const(_, e) {
|
item_const(_, e) {
|
||||||
// make a fake fcx
|
// do nothing -- item_consts don't refer to local vars
|
||||||
let v: @mutable [node_id] = @mutable [];
|
|
||||||
let fake_fcx =
|
|
||||||
{
|
|
||||||
// just bogus
|
|
||||||
enclosing:
|
|
||||||
{constrs: new_def_hash::<constraint>(),
|
|
||||||
num_constraints: 0u,
|
|
||||||
cf: return_val,
|
|
||||||
i_return: ninit(0, ""),
|
|
||||||
i_diverge: ninit(0, ""),
|
|
||||||
used_vars: v},
|
|
||||||
id: 0,
|
|
||||||
name: "",
|
|
||||||
ccx: ccx};
|
|
||||||
find_pre_post_expr(fake_fcx, e);
|
|
||||||
}
|
}
|
||||||
item_fn(_, _, body) {
|
item_fn(_, _, body) {
|
||||||
assert (ccx.fm.contains_key(i.id));
|
assert (ccx.fm.contains_key(i.id));
|
||||||
|
|
3
src/test/run-pass/issue-1660.rs
Normal file
3
src/test/run-pass/issue-1660.rs
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
fn main() {
|
||||||
|
const _x: int = 1<<2;
|
||||||
|
}
|
Loading…
Reference in a new issue