Closed
Description
I've got two clues, the first is the ICE
fn main() {
::.x;
}
RUST_LOG=rustc=1 rustc main.rs
task 'rustc' failed at 'assertion failed: end <= self.len()', /home/derek/dev/rust/src/libstd/vec.rs:980
error: internal compiler error: unexpected failure
This message reflects a bug in the Rust compiler.
We would appreciate a bug report: https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1 to get further details and report the results to github.com/mozilla/rust/issues
task '<main>' failed at 'explicit failure', /home/derek/dev/rust/src/librustc/lib.rs:397
The second appears to be a parser error
pub mod m {
pub fn foo(){}
}
fn main() {
::m::.foo()
}
$ RUST_LOG=rustc=1 rustc main.rs
main.rs:6:4: 6:9 error: unresolved name `m`.
main.rs:6 ::m::.foo()
^~~~~
error: aborting due to previous error
task 'rustc' failed at 'explicit failure', /home/derek/dev/rust/src/libsyntax/diagnostic.rs:101
task '<main>' failed at 'explicit failure', /home/derek/dev/rust/src/librustc/lib.rs:397
Seems to me the parser should catch that and report something like
main.rs:6:4: 6:9 error: expected identifier, but found `.`
$ rustc -v
rustc 0.9-pre (72e432d 2013-11-04 17:22:03 -0800)
host: x86_64-unknown-linux-gnu
$ uname -a
Linux hostname 3.10-1-amd64 #1 SMP Debian 3.10.1-1 (2013-07-16) x86_64 GNU/Linux