Source context

Rust library

split_first

This is Rust standard-library source from the compiler version used in the run.

195     #[rustc_const_stable(feature = "const_slice_first_last_not_mut", since = "1.56.0")]196     #[inline]197     #[must_use]198     pub const fn split_first(&self) -> Option<(&T, &[T])> {199         if let [first, tail @ ..] = self { Some((first, tail)) } else { None }200     }201 

Aeneas declaration

Aeneas generated this declaration for a Rust library operation. Any authored model recorded for this operation is shown below.

@[rust_fun "core::slice::{[@T]}::split_first"]
axiom core.slice.Slice.split_first
  {T : Type} : Slice T → Result (Option (T × (Slice T)))
Source details
Declarationcore.slice.Slice.split_first
File/rustc/library/core/src/slice/mod.rs
Lines198:4–198:57
Program versionPreparation 1