- Improve handling of inner-docstring comments (i.e.,
///
-prefixed comments)
- Support handling of capturing macros (
macro_pat
) during pattern matches
- Improved handling of comments around clauses/stanzas
- Each comment now maintains loyalty to the clause the user picked it to stay with, rather than automatically migrating to the previous clause in the presence of
assert ... by { ... }
-style constructs
- Each comment now maintains loyalty to the clause the user picked it to stay with, rather than automatically migrating to the previous clause in the presence of
- Support parsing for const generic literals
- Support parsing
opens_invariants
with specific concrete sets
- Minor fix to prevent panic on formatting files containing unbalanced parentheses in strings/chars/...
- Handle comments inside
&&&
/|||
-bulleted blocks better
- Support dividing statement lists into clauses/stanzas
- Support attributes in
broadcast group
s
- Support parsing empty requires/ensures/... clauses
- Fix incorrect parsing of string literals containing "verus!{"
- Support automatic formatting of the
seq!
macro
- Support const generic arguments
- Introduce
--update
to update to latest Verusfmt easily- Only works on pre-built binaries, the recommended way to install verusfmt.
- Support automatic formatting of the
calc!
macro - Support for named iterators in
for
loops
- Support generic argument binding
- Useful for associated type constraints, such as
trait Foo<T>: Bar<V = Baz<T>>
- Useful for associated type constraints, such as
- Support attributes on
broadcast group
items - Improve styling of
broadcast use
s, ensuring trailing newline - Add support for the
no_unwind
clause on functions
- Improve handling of
rustfmt.toml
for non-verus!
code- Rather than picking up
rustfmt.toml
based on working directory, it is now picked up based on the file being formatted. This now matches the search thatrustfmt
itself does.
- Rather than picking up
- Add support for
broadcast proof
,broadcast group
, andbroadcast use
(see verus#1022)
- Add support for
invariant_except_break
clauses, recently added to Verus - Support arbitrary permutation of clauses in loops, rather than a pre-specified order
- Add support for
for
loops with invariants, recently added to Verus - Improve parsing of range expressions (e.g.,
0..(1 + 2)
) that start "float-like"
- Improve
verus!{ ... }
macro collapsing inside indented contexts (#39)
- When running verusfmt on multiple files, continue attempting files even if one in the middle fails (#37)
- Fix collection of idempotency issues caused by rustfmt (#38)
- rustfmt would modify code inside of
verus! { ... }
after verusfmt has already formatted it in certain cases - Verusfmt now prevents rustfmt from modifying code inside the Verus macro, through a collapse/expand operation
- rustfmt would modify code inside of
- Fix
FnSpec
parsing- Despite Verus having deprecated
FnSpec
with the introduction ofspec_fn
, verusfmt still supports it for projects on older Verus
- Despite Verus having deprecated
- Fix idempotency issue of macro-items inside
verus!
inside in-filemod
ules - Fix multi-line inline comment treatment
- Only treat multi-line comments as inline if the entire comment is on a single line
- Move verusfmt to the verus-lang organization: https://github.com/verus-lang/verusfmt
- Don't drop "?" or "~" from type bounds
- Allow (bare) trigger attributes to be inline, rather than always on their own line
- Add support for new
spec_fn
- Update handling for
fn_trait_types
- Add support for
const
params - Add support for
opens_invariants
- Improve handling of complex self-params (e.g.,
tracked '&a self
) - Introduce
#[verusfmt::skip]
(#31) - Add support for new
->
andmatches
expressions (#32)
- Reduce collapsing of various multiple single-line comments
- Fixed extra spaces in if-expressions with negation (#24)
- Fixed precedence for quantifiers and
&&&
and|||
(#26) - Handle macro call statements (#27)
- Improved handling of non-inline single-line comments (#28)
- Treat comments inside function signatures as inline by default
- Improved output for
--check
Initial public release!