Skip to content

Fix warning about nonzero_internals in vstd - #2673

Merged
jaylorch merged 1 commit into
mainfrom
fix-nonzero-internals
Jul 16, 2026
Merged

Fix warning about nonzero_internals in vstd#2673
jaylorch merged 1 commit into
mainfrom
fix-nonzero-internals

Conversation

@jaylorch

@jaylorch jaylorch commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

This prevents getting warnings like the following:

"cargo" "verus" "verify" "--" "--verify-root"
warning: unexpected `cfg` condition value: `nonzero_internals`
  --> C:\Apps\verus\source\vstd\std_specs\mod.rs:39:7
   |
39 | #[cfg(feature = "nonzero_internals")]
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: expected values for `feature` are: `alloc`, `allocator`, `allow_panic`, `default`, `std`, and `strict_provenance_atomic_ptr`
   = help: consider adding `nonzero_internals` as a feature in `Cargo.toml`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
   = note: requested on the command line with `-W unexpected-cfgs`

warning: unexpected `cfg` condition value: `nonzero_internals`
   --> C:\Apps\verus\source\vstd\vstd.rs:152:11
    |
152 |     #[cfg(feature = "nonzero_internals")]
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `alloc`, `allocator`, `allow_panic`, `default`, `std`, and `strict_provenance_atomic_ptr`
    = help: consider adding `nonzero_internals` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: `vstd` (lib) generated 3 warnings (1 duplicate)
    Checking test4 v0.1.0 (C:\Apps\verus-systems-code\local\test4)
note: verifying root module

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

@jaylorch
jaylorch requested a review from Copilot July 16, 2026 20:25
@jaylorch
jaylorch marked this pull request as ready for review July 16, 2026 20:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the vstd crate’s Cargo feature definitions to match existing cfg(feature = "nonzero_internals") usage in the vstd sources, eliminating the Rust unexpected_cfgs warning about an unknown feature value when building vstd via Cargo.

Changes:

  • Declares the nonzero_internals Cargo feature in source/vstd/Cargo.toml.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Chris-Hawblitzel

Copy link
Copy Markdown
Collaborator

Seems to be related to #2471

@Chris-Hawblitzel Chris-Hawblitzel removed their assignment Jul 16, 2026
@jaylorch
jaylorch requested a review from elanortang July 16, 2026 21:07
@jaylorch
jaylorch added this pull request to the merge queue Jul 16, 2026
Merged via the queue into main with commit 2fd119c Jul 16, 2026
14 checks passed
@jaylorch
jaylorch deleted the fix-nonzero-internals branch July 16, 2026 22:48
sarah-quinones pushed a commit to sarah-quinones/verus that referenced this pull request Jul 17, 2026
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.

4 participants