Skip to content

Failed to parse !~= #145

@bbayazit16

Description

@bbayazit16

verusfmt can't format this document:

use vstd::prelude::*;

verus! {
    proof fn my_proof() {
        let a = Seq::empty().push(4int);
        let b = Seq::empty().push(0int);

        assert(a[0] !~= b[0]);
    }
}

fn main() {}

$ verusfmt src/main.rs:

Error: 
  × Failed to parse
   ╭─[src/main.rs:8:22]
 78assert(a[0] !~= b[0]);
   ·                      ┬
   ·                      ╰── here
 9}
   ╰────
  help: Expected one of: COMMENT, has_str, is_str

whereas Verus verification passes, and Verus analyzer doesn't complain.

$ verusfmt --version:
verusfmt 0.5.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions