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

Replace if cfg!(kani) by #[cfg(kani)] #148

Merged
merged 3 commits into from
May 15, 2023
Merged

Conversation

celinval
Copy link
Contributor

In previous version of rustc, they would have similar behavior even in debug mode, where all the logic from a false evaluation would be pruned.

This is no longer true in the current rustc release candidate. I created this thread to see if this was by design or if it's a bug.

That said, this is currently blocking the Kani toolchain upgrade PR, so I was hoping we could switch the definition. Thanks!

In previous version of rustc, they would have similar behavior
even in debug mode, where all the logic from a `false` evaluation would
be pruned.

This is no longer true in the current rustc release candidate.
@@ -28,20 +28,18 @@ pub struct TargetLocation {

impl TargetLocation {
pub fn should_run(&self) -> bool {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be cleaner to duplicate this function instead since there is no common code between kani and not(kani)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

@@ -65,59 +63,71 @@ impl TargetLocation {
}

pub fn abs_path(&self) -> Option<PathBuf> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@camshaft camshaft merged commit 346a918 into camshaft:master May 15, 2023
@celinval celinval deleted the cfg_kani branch May 16, 2023 00:11
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.

3 participants