-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a few more issues with the std library (#3261)
- Enable Kani to use fallback fn body for intrinsics, so they can be verified. - Until <rust-lang/project-stable-mir#79> is implemented, we have to check has_body and must_be_overridden - Export all kani_macro definitions. Rename `unstable` to avoid conflict with the Rust standard library one. - Dump stable mir body since transformations are made at that level. - I just did this as I was debugging things. Co-authored-by: Michael Tautschnig <[email protected]>
- Loading branch information
1 parent
34b35d8
commit db54783
Showing
14 changed files
with
80 additions
and
54 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
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
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
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
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
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,13 +1,13 @@ | ||
// Copyright Kani Contributors | ||
// SPDX-License-Identifier: Apache-2.0 OR MIT | ||
|
||
#[kani::unstable(feature = "always_fails", reason = "do not enable", issue = "<link>")] | ||
#[kani::unstable_feature(feature = "always_fails", reason = "do not enable", issue = "<link>")] | ||
pub fn always_fails() { | ||
assert!(false, "don't call me"); | ||
} | ||
|
||
/// We use "gen-c" since it has to be an existing feature. | ||
#[kani::unstable(feature = "gen-c", reason = "internal fake api", issue = "<link>")] | ||
#[kani::unstable_feature(feature = "gen-c", reason = "internal fake api", issue = "<link>")] | ||
pub fn no_op() { | ||
kani::cover!(true); | ||
} |
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,32 +1,32 @@ | ||
error: failed to parse `#[kani::unstable]`: missing `feature` field\ | ||
error: failed to parse `#[kani::unstable_feature]`: missing `feature` field\ | ||
lib.rs | ||
|\ | ||
9 | #[kani::unstable(reason = "just checking", issue = "<link>")]\ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ | ||
9 | #[kani::unstable_feature(reason = "just checking", issue = "<link>")]\ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ | ||
|\ | ||
= note: expected format: #[kani::unstable(feature="<IDENTIFIER>", issue="<ISSUE>", reason="<DESCRIPTION>")]\ | ||
= note: this error originates in the attribute macro `kani::unstable` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
= note: expected format: #[kani::unstable_feature(feature="<IDENTIFIER>", issue="<ISSUE>", reason="<DESCRIPTION>")]\ | ||
= note: this error originates in the attribute macro `kani::unstable_feature` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: failed to parse `#[kani::unstable]`: expected "key = value" pair, but found `feature("invalid_args")`\ | ||
error: failed to parse `#[kani::unstable_feature]`: expected "key = value" pair, but found `feature("invalid_args")`\ | ||
lib.rs\ | ||
|\ | ||
| #[kani::unstable(feature("invalid_args"))]\ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ | ||
| #[kani::unstable_feature(feature("invalid_args"))]\ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ | ||
|\ | ||
= note: expected format: #[kani::unstable(feature="<IDENTIFIER>", issue="<ISSUE>", reason="<DESCRIPTION>")] | ||
= note: expected format: #[kani::unstable_feature(feature="<IDENTIFIER>", issue="<ISSUE>", reason="<DESCRIPTION>")] | ||
|
||
error: failed to parse `#[kani::unstable]`: expected "key = value" pair, but found `feature`\ | ||
error: failed to parse `#[kani::unstable_feature]`: expected "key = value" pair, but found `feature`\ | ||
lib.rs\ | ||
|\ | ||
| #[kani::unstable(feature, issue)]\ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ | ||
| #[kani::unstable_feature(feature, issue)]\ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ | ||
|\ | ||
= note: expected format: #[kani::unstable(feature="<IDENTIFIER>", issue="<ISSUE>", reason="<DESCRIPTION>")] | ||
= note: expected format: #[kani::unstable_feature(feature="<IDENTIFIER>", issue="<ISSUE>", reason="<DESCRIPTION>")] | ||
|
||
error: failed to parse `#[kani::unstable]`: expected "key = value" pair, but found `1010`\ | ||
error: failed to parse `#[kani::unstable_feature]`: expected "key = value" pair, but found `1010`\ | ||
lib.rs\ | ||
|\ | ||
| #[kani::unstable(1010)]\ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^\ | ||
| #[kani::unstable_feature(1010)]\ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ | ||
|\ | ||
= note: expected format: #[kani::unstable(feature="<IDENTIFIER>", issue="<ISSUE>", reason="<DESCRIPTION>")] | ||
= note: expected format: #[kani::unstable_feature(feature="<IDENTIFIER>", issue="<ISSUE>", reason="<DESCRIPTION>")] |
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