Skip to content
Xen / docs

Search documentation

English · v0.1.0-demo.2

Type to search the documentation.

    한국어
    Xen / reference v0.1.0-demo.2

    Scope modes

    #![explc] applies to the immediately following function. #scope[explc] { ... } enables explicit references within a block. A caller needs its own annotation.

    #![explc]
    fn append_shared(values: &mut Vec<Int>) {
    values.push(3);
    }

    References still obey the copy, move, and borrow rules.

    Applies to code marked with #scope[opt] { ... }. build, run, and test default to --opt=basic; use --opt=off to disable it. Unmarked code is unaffected. --opt-report and --opt-cache=directory require basic and are unavailable for check.

    A facility for raw memory and operating-system calls. The user documentation supplied for this release does not define its detailed APIs and guarantees. Use the standard library for ordinary files, I/O, and paths.

    Learn more: Copies, moves, and references · Command-line tools · Syntax and common problems

    For a complete program and diagnostic walkthrough, read Scope modes in Learn.