check_std_move_on_references

Function check_std_move_on_references 

Source
pub fn check_std_move_on_references(
    function: &Function,
    function_safety: SafetyMode,
) -> Vec<String>
Expand description

Check for std::move on references in @safe code

In @safe code, using std::move on a reference is forbidden because:

  • std::move on a reference moves the underlying object, not the reference
  • This differs from Rust’s semantics where references are first-class types
  • Users should use rusty::move for Rust-like reference move semantics

This check tracks reference variables and reports errors when std::move is called on them.