Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use AssertKind::fmt_assert_args now that it's public #494

Merged
merged 3 commits into from
May 6, 2021

Conversation

dario23
Copy link
Contributor

@dario23 dario23 commented May 3, 2021

See #467 and rust-lang/rust#84392 for some context.

@dario23
Copy link
Contributor Author

dario23 commented May 3, 2021

hm, currently fails because the messages change in the tests.. and looking at the differences, i think we might want to keep using the Display impl as far as possible still, as the messages produced by fmt_assert_args are not the same as the Display impl, e.g.

// .fmt_assert_args()
msg: "7:9: 7:14: [Prusti: verification error] assertion might fail with \"\"attempt to divide `{}` by zero\", _4\""

vs.

// .description()
msg: "assertion might fail with \"attempt to divide by zero\"",

The `description` method still gives nicer errors for everything else.
@dario23 dario23 force-pushed the fmt-assert-args branch from 0255274 to 3bea86e Compare May 5, 2021 13:25
@fpoli fpoli merged commit 7e8882d into viperproject:master May 6, 2021
@dario23 dario23 deleted the fmt-assert-args branch May 6, 2021 09:46
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.

2 participants