-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When indenting, say, an
impl
, verusfmt
indents everything, includ…
…e white space. For example, in this code: ``` impl Foo for Bar { spec fn hi() -> bool { true } spec fn bye() -> bool { true } } ``` We end up with a tab between the end of `hi` and the start of `bye`. There are a few other places where we occasionally leave/add a trailing space, say after a closure argument list. This commit adds a pass to strip such space.
- Loading branch information
Showing
4 changed files
with
36 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,16 @@ | ||
use vstd::prelude::*; | ||
|
||
verus! { | ||
|
||
/* | ||
spec fn test_rec2(x: int, y: int) -> int | ||
decreases x, y, | ||
{ | ||
3 | ||
} | ||
*/ | ||
|
||
spec fn add0(a: nat, b: nat) -> nat | ||
recommends | ||
a > 0, | ||
via add0_recommends, | ||
{ | ||
a | ||
} | ||
impl Foo for Bar { | ||
spec fn hi() -> bool { | ||
true | ||
} | ||
|
||
#[via_fn] | ||
proof fn add0_recommends(a: nat, b: nat) { | ||
// proof | ||
spec fn bye() -> bool { | ||
true | ||
} | ||
} | ||
|
||
/* | ||
spec fn rids_match(bools_start: nat) -> bool | ||
decreases bools_start, | ||
when 0 <= bools_start <= bools_end <= bools.len() && 0 <= rids_start <= rids_end <= rids.len() | ||
{ | ||
true | ||
fn main() { | ||
} | ||
*/ | ||
|
||
fn main() {} | ||
|
||
} // verus! | ||
|
||
/* | ||
pub type ReplicaId = usize; // $line_count$Trusted$ | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters