On 08/16/2013 06:32 AM, Huon Wilson wrote:
On 16/08/13 11:33, Amitava Shee wrote:
I am getting the following error - is this a bug?

amitava:learn amitava$ cat app.rs <http://app.rs>
// vi:ts=4:sw=4:nu

fn main() {
    range(1u,3).map(|_| 5);
}
amitava:learn amitava$ make
rustc -Z debug-info -o app app.rs <http://app.rs>
app.rs:4:21: 4:22 error: internal compiler error: debuginfo: FunctionDebugContext should be initialized but is not!
app.rs:4 <http://app.rs:4>     range(1u,3).map(|_| 5);
                                 ^
make: *** [app] Error 101

amitava:learn amitava$ rustc --version
rustc 0.8-pre (5c0d192 2013-08-15 13:50:10 -0700)
host: x86_64-apple-darwin

---
Amitava


This is indeed a bug with debugging and closures; in fact, it was independently filed a few days ago (https://github.com/mozilla/rust/issues/8513); it looks like it'll be fixed very soon.


Huon


_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev
Yes, this is the same bug and will be fixed with the PR I plan to do later today. I added your case to the test-suite to make sure that it indeed doesn't crash anymore. Compiling with -Zdebug-info should still be considered experimental at the moment. That being said, we are always glad about getting reports like this!

-Michael
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to