Closed
Description
rusti> use core::rand::RngUtil;
()
<anon>:31:0: 31:24 error: `use` and `extern mod` declarations must precede items
<anon>:31 use core::rand::RngUtil;
^~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
rust: task failed at 'explicit failure', /Users/danluu/Downloads/rust-0.6/src/libsyntax/diagnostic.rs:99
rusti> assert!(true);
<anon>:31:0: 31:24 error: `use` and `extern mod` declarations must precede items
<anon>:31 use core::rand::RngUtil;
^~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
rust: task failed at 'explicit failure', /Users/danluu/Downloads/rust-0.6/src/libsyntax/diagnostic.rs:99
Is this considered to be worth fixing? I think I hack in a kludge that would fix this, but there's this big comment in rusti.c:
/**
* The AST (or the rest of rustc) are not sendable yet,
* so recorded things are printed to strings. A terrible hack that
* needs changes to rustc in order to be outed. This is unfortunately
* going to cause the REPL to regress in parser performance,
* because it has to parse the statements and view_items on each
* input.
*/
If that change will fix it anyway, I'm not sure it's worth making a temporary fix.
Metadata
Metadata
Assignees
Labels
No labels