OxL Reference

3.9 Copy and move

  • Copy types: primitives, str, bytes, Duration, Time and other time types, distinct/refined types over a Copy type, tuples and arrays of Copy types, and data/enum with @derive(Copy) all of whose fields are Copy.
  • Other values are moved on assignment, on passing to a function and on return. Use after move is a compile error.
  • An explicit copy is x.clone() (interface Clone).

use-after-move

See also

Source: docs/spec/oxl-standard.en.md