Closed
Description
error log
WARNING: The Rust REPL is experimental and may be
unstable. If you encounter problems, please use the
compiler instead. Type :help for help.
rusti> :load fact
compiling fact.rs...
warning: missing crate link meta `name`, using `fact` as default
warning: missing crate link meta `vers`, using `0.0` as default
pushed .
crates loaded: fact
rusti> fact::factorial(12)
<anon>:5:12: 5:28 error: can't find crate for `fact`
<anon>:5 extern mod fact;
^~~~~~~~~~~~~~~~
task <unnamed> failed at 'explicit failure', /home/minh/Documents/Workplace/rust/rust/src/libsyntax/diagnostic.rs:69
rusti>
content of fact.rs
fn factorial(n: uint) -> uint {
let mut r = 1;
for i in range(2, n) {
r *= i;
}
r
}
After running the above section, a file named fact.o
is created.
Metadata
Metadata
Assignees
Labels
No labels