You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
fnfactorial(n:uint) -> uint{letmut r = 1;for i inrange(2, n){
r *= i;}
r
}
After running the above section, a file named fact.o is created.
when I manually compile fact.rs using rustc --lib fact.rs, resulting in a libfact-<hash>-0.0.so file, and then :load fact in rusti, rusti can find the library but it dumps core after I call fact::factorial(12)
output
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
crates loaded: fact
rusti> fact::factorial(12)
[1] 8330 abort (core dumped) rusti
Activity
minhnhdo commentedon Aug 8, 2013
I'd love to work on fixing this if you guys are short on man power.
minhnhdo commentedon Aug 9, 2013
when I manually compile
fact.rsusingrustc --lib fact.rs, resulting in alibfact-<hash>-0.0.sofile, and then:load factinrusti,rustican find the library but it dumps core after I callfact::factorial(12)output
auto merge of #9897 : thestinger/rust/rusti, r=alexcrichton
Merge rust-lang#8392