Skip to content

error: compiler_builtins cannot call functions through upstream monomorphizations #111

@zjp-CN

Description

@zjp-CN
error: `compiler_builtins` cannot call functions through upstream monomorphizations; encountered invalid call from `core::ops::index_range::IndexRange::next_unchecked` to `core::ops::index_range::IndexRange::next_unchecked::kani_contract_mode`
  --> /home/runner/work/distributed-verification/distributed-verification/verify-rust-std/library/core/src/ops/index_range.rs:63:5
   |
63 |     #[cfg_attr(kani, kani::modifies(self))]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the attribute macro `kani::modifies` (in Nightly builds, run with -Z macro-backtrace for more info)

dv fails to compile compiler_builtins at 58b34c8

https://github.com/os-checker/distributed-verification/actions/runs/17088072312/job/48456215614

cc

But I've checked no -Clink-dead-code is specified anywhere.


When the attribute is removed on IndexRange::next_unchecked, all crates compile fine. 🤔
So not sure if this is a regression or something going wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions