Skip to content

Warn on always false contract predicates#117

Draft
robjtede wants to merge 1 commit into
mainfrom
codex-detect-false-contract-predicate
Draft

Warn on always false contract predicates#117
robjtede wants to merge 1 commit into
mainfrom
codex-detect-false-contract-predicate

Conversation

@robjtede

@robjtede robjtede commented Jul 5, 2026

Copy link
Copy Markdown
Member

Summary

  • detect literal false contract predicates during attribute parsing
  • rewrite them through a deprecated const so stable Rust emits a compile-time warning
  • add an MSRV-gated trybuild fixture that asserts the warning via #![deny(deprecated)]

Closes #26.

Validation

  • cargo +1.65.0 test --test ui
  • just clippy
  • just test

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fc9ecdf5-8a70-4e67-ac0a-301fa33dafe4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex-detect-false-contract-predicate

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

Check that predicate is not always false

1 participant