Skip to content

libcore is out of sync #465

@zjp-CN

Description

@zjp-CN
CI failure

https://github.com/model-checking/verify-rust-std/actions/runs/17010362898
https://github.com/model-checking/verify-rust-std/actions/runs/17014456701

error: expected identifier
    --> /home/runner/work/verify-rust-std/verify-rust-std/library/core/src/ptr/non_null.rs:1804:12
     |
1804 |         I: ~const SliceIndex<[T]>,
     |            ^

error[E0599]: no method named `get_unchecked_mut` found for struct `ptr::non_null::NonNull` in the current scope
    --> /home/runner/work/verify-rust-std/verify-rust-std/library/core/src/ptr/non_null.rs:2312:25
     |
  81 | pub struct NonNull<T: PointeeSized> {
     | ----------------------------------- method `get_unchecked_mut` not found for this struct
...
2312 |             let _ = ptr.get_unchecked_mut(lower..upper);
     |                         ^^^^^^^^^^^^^^^^^ method not found in `ptr::non_null::NonNull<[i32]>`
     |
     = help: items from traits can only be used if the trait is implemented and in scope
note: `slice::index::SliceIndex` defines an item `get_unchecked_mut`, perhaps you need to implement it
    --> /home/runner/work/verify-rust-std/verify-rust-std/library/core/src/slice/index.rs:165:1
     |
 165 | pub unsafe trait SliceIndex<T: ?Sized>: private_slice_index::Sealed {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Current libcore fails to compile due to lack of synchronization:

pub const unsafe fn get_unchecked_mut<I>(self, index: I) -> NonNull<I::Output>
where
I: ~const SliceIndex<[T]>,

vs

upstream: https://github.com/rust-lang/rust/blob/2e2642e641a941f0a1400c7827fd89aa86fef8f4/library/core/src/ptr/non_null.rs#L1631-L1633

~const Trait has changed to [const] Trait since rust-lang#139858 and for the file at commit rust-lang@7bc3462 .

I suspect the sync is not properly performed. The last update in verify-rust-std covered 7d82b83, while 7bc3462 happens before 7d82b83, meaning [const] Trait changes must have existed at that update point.

7d82b83 2025-08-06 bors                  Auto merge of #144509 - cuviper:relnotes-1.89.0, r=BoxyUwU
...
7bc3462 2025-08-06 Boxy                  tidy

Update: created a thread to ask Nightly compiler breaks at the same version on compiler channel of rust zulipchat.

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