Skip to content

Mutable references (&mut T) with complex aliasing (meta-issue) #420

@W95Psp

Description

@W95Psp

Hax promotes a functional style in Rust: it doesn't aim at supporting complex mutation schemes.

We allow:

  • &mut arguments on user-defined functions;
  • pass &mut arguments to any function or operator;
  • use of certain &mut-returning functions.

We disallow:

  1. defining &mut-returning functions (see cryspen/hax-evit#8);
  2. aliasing an &mut-typed variable (i.e. fn f(x: &mut u8) { let y = x; ...}, see Unsupported: implicit reborrowing #419);
  3. mutable borrows inside types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    keep-openmetaunsupported-rustRust code rejected by hax. Unless marked wontfix, we want to support it soon.wontfix-v1This will not be worked on, but might after v1.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions