Skip to content

Failure to use rusti's :load command #8392

Closed
@minhnhdo

Description

@minhnhdo

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions