Skip to content

Conversation

@Marsman1996
Copy link
Contributor

@Marsman1996 Marsman1996 commented Feb 2, 2026

Fix #2082

Now the verusdoc will display the doc for

#[verus_spec(ret =>
    with
        ghost_in1: Tracked<int>,
        ghost_in2: Tracked<int>,
        ->
        ghost_out: Ghost<(int,int)>,
    requires
        ghost_in1@ >= 0,
    ensures
        ghost_out@.0 == ghost_in1@,
        ret == 0,
)]
pub fn spec_with_example(&self) -> u32 {

as

pub exec fn spec_with_example(&self) -> ret : u32
with
  ghost_in1: Tracked <int>,
  ghost_in2: Tracked <int>,
  ->
  ghost_out: Ghost <(int,int)>,
requires
  ghost_in1@ >= 0,
ensures
  ghost_out@.0 == ghost_in1@,
  ret == 0,

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@rikosellic
Copy link
Contributor

The generated doc of the example can be found here.

Co-authored-by: Xinyi Wan <64517311+rikosellic@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

verusdoc: cannot display ensures and requiresfor verus_spec

2 participants