Closed
Description
Nested modules with static items cause this error:
error: internal compiler error: unexpected failure
This message reflects a bug in the Rust compiler.
We would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: the compiler hit an unexpected failure path. this is a bug
task 'rustc' failed at 'No enclosing scope for id 17', /home/flaper87/workspace/personal/rust/src/librustc/middle/region.rs:145
Output for: rustc test.rs --pretty expanded,identified
use std::prelude::*;
extern mod std = "std#0.10-pre";
extern mod green = "green#0.10-pre";
extern mod rustuv = "rustuv#0.10-pre";
fn main() {
mod t {
use std::prelude::*;
enum E { V = (1 /* 10 */), A = (0 /* 12 */), }
/*
9
*/
static C: E = (V /* 17 */);
/*
14
*/
}
/*
7
*/
} /* block 19 */ /* 5 */