Skip to content

Commit a4e211a

Browse files
authored
Merge pull request #99 from os-checker/sync
Sync: update toolchain to 2025-08-01
2 parents df283c3 + a6a4a8c commit a4e211a

File tree

22 files changed

+16798
-19305
lines changed

22 files changed

+16798
-19305
lines changed

.github/gen_core.json.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export VERIFY_RUST_STD_LIBRARY=$WORKSPACE/verify-rust-std/library
1313
# * update runid after verify-rust-std submodule syncs
1414
# * update snapshots after runid changes
1515
rm tmp -rf
16-
gh run download -D tmp -R model-checking/verify-rust-std 16057809811
16+
gh run download -D tmp -R model-checking/verify-rust-std 16777123952
1717

1818
ls -alh $VERIFY_RUST_STD_LIBRARY
1919

.github/workflows/test.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ env:
99

1010
jobs:
1111
test:
12-
runs-on: ubuntu-latest
12+
runs-on: ubuntu-24.04-arm
13+
# runs-on: ubuntu-latest
1314
steps:
1415
- uses: actions/checkout@v4
1516

@@ -30,7 +31,7 @@ jobs:
3031
working-directory: assets
3132
run: |
3233
ls -alh core.json
33-
head -n 1000 core.json
34+
head -n 100 core.json
3435
3536
- name: Upload core.json
3637
uses: actions/upload-artifact@v4
@@ -73,16 +74,16 @@ jobs:
7374
- name: Kani list
7475
working-directory: verify-rust-std
7576
if: ${{ env.AUTO == '' }}
76-
run: kani list -Zlist ${{ env.UNSTABLE_ARGS }} --std ./library --format=json
77+
run: kani list ${{ env.UNSTABLE_ARGS }} --std ./library --format=json
7778

7879
- name: Kani list with Autoharness
7980
working-directory: verify-rust-std
8081
if: ${{ env.AUTO == '-autoharness' }}
81-
run: kani autoharness -Z autoharness --list -Z list ${{ env.UNSTABLE_ARGS }} --std ./library --format=json
82+
run: kani autoharness -Z autoharness --list ${{ env.UNSTABLE_ARGS }} --std ./library --format=json
8283

8384
- name: View list
8485
working-directory: verify-rust-std
85-
run: ls -alh kani-list.json && cat kani-list.json
86+
run: ls -alh kani-list.json && head -n 100 kani-list.json
8687

8788
- name: Upload kani-list.json
8889
uses: actions/upload-artifact@v4

kani

Submodule kani updated 277 files

src/bin/distributed-verification/functions/cache/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ use distributed_verification::{SerFunction, SourceCode};
77
use indexmap::IndexSet;
88
use rustc_data_structures::fx::FxHashMap;
99
use rustc_middle::ty::TyCtxt;
10+
use rustc_public::mir::mono::Instance;
1011
use rustc_span::source_map::{SourceMap, get_source_map};
11-
use stable_mir::mir::mono::Instance;
1212
use std::{
1313
cell::RefCell,
1414
cmp::{Ordering, Reverse},

src/bin/distributed-verification/functions/kani/coercion.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ use rustc_middle::traits::{ImplSource, ImplSourceUserDefinedData};
1818
use rustc_middle::ty::TraitRef;
1919
use rustc_middle::ty::adjustment::CustomCoerceUnsized;
2020
use rustc_middle::ty::{PseudoCanonicalInput, Ty, TyCtxt, TypingEnv};
21-
use rustc_smir::rustc_internal;
21+
use rustc_public::Symbol;
22+
use rustc_public::rustc_internal;
23+
use rustc_public::ty::{RigidTy, Ty as TyStable, TyKind};
2224
use rustc_span::DUMMY_SP;
23-
use stable_mir::Symbol;
24-
use stable_mir::ty::{RigidTy, Ty as TyStable, TyKind};
2525

2626
/// Given an unsized coercion (e.g. from `&u8` to `&dyn Debug`), extract the pair of
2727
/// corresponding base types `T`, `U` (e.g. `u8`, `dyn Debug`), where the source base type `T` must

src/bin/distributed-verification/functions/kani/reachability.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ use rustc_data_structures::fingerprint::Fingerprint;
2323
use rustc_data_structures::fx::FxHashSet;
2424
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
2525
use rustc_middle::ty::{TyCtxt, VtblEntry};
26-
use rustc_session::config::OutputType;
27-
use rustc_smir::rustc_internal;
28-
use stable_mir::mir::alloc::{AllocId, GlobalAlloc};
29-
use stable_mir::mir::mono::{Instance, InstanceKind, MonoItem, StaticDef};
30-
use stable_mir::mir::{
26+
use rustc_public::mir::alloc::{AllocId, GlobalAlloc};
27+
use rustc_public::mir::mono::{Instance, InstanceKind, MonoItem, StaticDef};
28+
use rustc_public::mir::{
3129
Body, CastKind, ConstOperand, MirVisitor, PointerCoercion, Rvalue, Terminator, TerminatorKind,
3230
visit::Location,
3331
};
34-
use stable_mir::ty::{Allocation, ClosureKind, ConstantKind, RigidTy, Ty, TyKind};
35-
use stable_mir::{CrateDef, ItemKind};
36-
use stable_mir::{CrateItem, DefId};
32+
use rustc_public::rustc_internal;
33+
use rustc_public::ty::{Allocation, ClosureKind, ConstantKind, RigidTy, Ty, TyKind};
34+
use rustc_public::{CrateDef, ItemKind};
35+
use rustc_public::{CrateItem, DefId};
36+
use rustc_session::config::OutputType;
3737
use std::fmt::{Display, Formatter};
3838
use std::{
3939
collections::{HashMap, HashSet},
@@ -75,7 +75,7 @@ pub fn filter_crate_items<F>(tcx: TyCtxt, predicate: F) -> Vec<Instance>
7575
where
7676
F: Fn(TyCtxt, Instance) -> bool,
7777
{
78-
let crate_items = stable_mir::all_local_items();
78+
let crate_items = rustc_public::all_local_items();
7979
// Filter regular items.
8080
crate_items
8181
.iter()
@@ -109,7 +109,7 @@ pub fn filter_const_crate_items<F>(tcx: TyCtxt, mut predicate: F) -> Vec<MonoIte
109109
where
110110
F: FnMut(TyCtxt, Instance) -> bool,
111111
{
112-
let crate_items = stable_mir::all_local_items();
112+
let crate_items = rustc_public::all_local_items();
113113
let mut roots = Vec::new();
114114
// Filter regular items.
115115
for item in crate_items {
@@ -552,6 +552,7 @@ fn collect_alloc_items(tcx: TyCtxt, alloc_id: AllocId) -> Vec<MonoItem> {
552552
let vtable_id = vtable_alloc.vtable_allocation().unwrap();
553553
items = collect_alloc_items(tcx, vtable_id);
554554
}
555+
GlobalAlloc::TypeId { ty: _ } => {}
555556
};
556557
items
557558
}

src/bin/distributed-verification/functions/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ use distributed_verification::SerFunction;
22
use indexmap::IndexSet;
33
use kani::{CallGraph, collect_reachable_items};
44
use rustc_middle::ty::TyCtxt;
5-
use stable_mir::mir::mono::{Instance, MonoItem};
5+
use rustc_public::{
6+
all_local_items,
7+
mir::mono::{Instance, MonoItem},
8+
};
69

710
mod cache;
811
pub use cache::{clear_rustc_ctx, set_rustc_ctx};
@@ -13,7 +16,7 @@ pub use kani::TOOL;
1316
mod utils;
1417

1518
pub fn analyze(tcx: TyCtxt) -> Vec<SerFunction> {
16-
let local_items = stable_mir::all_local_items();
19+
let local_items = all_local_items();
1720
let cap = local_items.len();
1821

1922
let mut entries = Vec::with_capacity(cap);

src/bin/distributed-verification/functions/utils.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
use distributed_verification::{InstKind, MacroBacktrace, ProofKind, SourceCode};
22
use rustc_middle::ty::TyCtxt;
3-
use rustc_smir::rustc_internal::internal;
3+
use rustc_public::{
4+
CrateDef,
5+
mir::mono::{Instance, InstanceKind},
6+
rustc_internal::internal,
7+
};
48
use rustc_span::{Span, source_map::SourceMap};
59
use rustc_stable_hash::{
610
FromStableHash, StableHasher,
711
hashers::{SipHasher128, SipHasher128Hash},
812
};
9-
use stable_mir::{
10-
CrateDef,
11-
mir::mono::{Instance, InstanceKind},
12-
};
1313
use std::hash::Hash;
1414

1515
fn new_inst_kind(kind: InstanceKind) -> Option<InstKind> {
@@ -28,7 +28,7 @@ fn span_to_snippet(span: Span, src_map: &SourceMap) -> String {
2828
/// Source code for a stable_mir span.
2929
pub fn source_code_with(
3030
inst: &Instance,
31-
stable_mir_span: stable_mir::ty::Span,
31+
stable_mir_span: rustc_public::ty::Span,
3232
tcx: TyCtxt,
3333
src_map: &SourceMap,
3434
path_prefixes: [&str; 2],
@@ -68,13 +68,14 @@ pub fn source_code_with(
6868

6969
fn get_all_attrs(tcx: TyCtxt, inst: &Instance) -> (Vec<String>, Option<ProofKind>) {
7070
use super::kani::{PROOF, PROOF_FOR_CONTRACT};
71-
use rustc_attr_data_structures::AttributeKind;
7271
use rustc_hir::Attribute;
72+
use rustc_hir::attrs::AttributeKind;
7373

7474
let def_id = internal(tcx, inst.def.def_id());
7575
let mut proof_kind = None;
7676
let attrs = tcx
7777
.get_all_attrs(def_id)
78+
.iter()
7879
.filter(|attr| match attr {
7980
Attribute::Unparsed(unparsed) => {
8081
let idents = &unparsed.path.segments;
@@ -93,9 +94,8 @@ fn get_all_attrs(tcx: TyCtxt, inst: &Instance) -> (Vec<String>, Option<ProofKind
9394
}
9495
false
9596
}
96-
Attribute::Parsed(AttributeKind::Repr(_)) => true,
97-
// FIXME: add support for #[align] when the toolchain bumps over 2025-06-19
98-
//
97+
Attribute::Parsed(AttributeKind::Repr { .. }) => true,
98+
Attribute::Parsed(AttributeKind::Align { .. }) => true,
9999
// * https://github.com/rust-lang/rust/commit/1fdf2b562070ec98c5b32ee67b8c6d8145127a6e
100100
// * https://github.com/rust-lang/rfcs/pull/3806
101101
// Attribute::Parsed(AttributeKind::Align(_)) => true,

src/bin/distributed-verification/main.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#![feature(rustc_private, let_chains, hash_set_entry, hasher_prefixfree_extras)]
1+
#![feature(rustc_private, hash_set_entry, hasher_prefixfree_extras)]
22

3-
extern crate rustc_attr_data_structures;
43
extern crate rustc_data_structures;
54
extern crate rustc_driver;
65
extern crate rustc_hir;
@@ -9,11 +8,10 @@ extern crate rustc_interface;
98
extern crate rustc_middle;
109
extern crate rustc_session;
1110
#[macro_use]
12-
extern crate rustc_smir;
11+
extern crate rustc_public;
1312
extern crate itertools;
1413
extern crate rustc_span;
1514
extern crate rustc_stable_hash;
16-
extern crate stable_mir;
1715

1816
use distributed_verification::kani_list::check_proofs;
1917
use eyre::Result;
@@ -65,7 +63,7 @@ fn main() -> Result<()> {
6563
});
6664

6765
match res {
68-
Ok(res_inner) | Err(stable_mir::CompilerError::Interrupted(res_inner)) => res_inner,
66+
Ok(res_inner) | Err(rustc_public::CompilerError::Interrupted(res_inner)) => res_inner,
6967
Err(err) => Err(eyre!("Unexpected error {err:?}")),
7068
}
7169
}

src/bin/distributed-verification/stat/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ use distributed_verification::statistics::*;
33
use indexmap::IndexMap;
44
use itertools::Itertools;
55
use rustc_middle::ty::TyCtxt;
6-
use rustc_smir::rustc_internal::internal;
7-
use stable_mir::CrateDef;
6+
use rustc_public::{CrateDef, external_crates, local_crate, rustc_internal::internal};
87

98
fn new_stat(tcx: TyCtxt) -> Stat {
109
Stat { local: new_local_crate(tcx), external: new_external_crates() }
1110
}
1211

1312
fn new_external_crates() -> ExternalCrates {
14-
let external_crates = stable_mir::external_crates();
13+
let external_crates = external_crates();
1514
let count = external_crates.len();
1615
// // NOTE: crate name may duplicate, like std will appear twice
1716
// let crates = external_crates.into_iter().map(|krate| krate.name).sorted().collect();
@@ -22,7 +21,7 @@ fn new_local_crate(tcx: TyCtxt) -> LocalCrateFnDefs {
2221
let mut this = LocalCrateFnDefs::default();
2322

2423
// for krate in stable_mir::find_crates("core") {
25-
let krate = stable_mir::local_crate();
24+
let krate = local_crate();
2625
let fn_defs = krate.fn_defs();
2726
this.fn_defs.total = fn_defs.len();
2827

@@ -32,7 +31,7 @@ fn new_local_crate(tcx: TyCtxt) -> LocalCrateFnDefs {
3231

3332
let did = internal(tcx, fn_def.def_id());
3433
// cc https://github.com/rust-lang/project-stable-mir/issues/83
35-
let kanitools_attrs = tcx.get_all_attrs(did).filter_map(|attr| {
34+
let kanitools_attrs = tcx.get_all_attrs(did).iter().filter_map(|attr| {
3635
if let rustc_hir::Attribute::Unparsed(attr) = attr {
3736
this.attrs.all_tool_attrs += 1;
3837
let paths = &attr.path.segments;

0 commit comments

Comments
 (0)