Skip to content

Commit 59b8ad6

Browse files
committed
Migrate to edition 2024
1 parent 47181f7 commit 59b8ad6

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

charon/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = [
55
"Son Ho <hosonmarc@gmail.com>",
66
"Guillaume Boisseau <nadrieril+git@gmail.com>",
77
]
8-
edition = "2021"
8+
edition = "2024"
99
license = "Apache-2.0"
1010

1111
[lib]

charon/src/bin/generate-ml/main.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -902,13 +902,13 @@ impl GenerateCodeFor {
902902
})
903903
.join("\n");
904904
if let Some(visitors) = visitors {
905-
let DeriveVisitors {
905+
let &DeriveVisitors {
906906
name,
907907
mut ancestors,
908908
reduce,
909909
extra_types,
910910
} = visitors;
911-
let varieties: &[_] = if *reduce {
911+
let varieties: &[_] = if reduce {
912912
&["iter", "map", "reduce", "mapreduce"]
913913
} else {
914914
&["iter", "map"]
@@ -921,7 +921,7 @@ impl GenerateCodeFor {
921921
ctx,
922922
&intermediate_visitor_name,
923923
ancestors,
924-
*reduce,
924+
reduce,
925925
extra_types
926926
.iter()
927927
.map(|s| s.to_string())
@@ -930,7 +930,9 @@ impl GenerateCodeFor {
930930
);
931931
intermediate_visitor_name_slice = [intermediate_visitor_name.as_str()];
932932
ancestors = &intermediate_visitor_name_slice;
933-
decls = format!("(* Ancestors for the {name} visitors *){intermediate_visitor}\n{decls}");
933+
decls = format!(
934+
"(* Ancestors for the {name} visitors *){intermediate_visitor}\n{decls}"
935+
);
934936
}
935937
let visitors = varieties
936938
.iter()

charon/src/ids/vector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ where
290290
self.iter_indexed().map(|(id, _)| id)
291291
}
292292

293-
pub fn all_indices(&self) -> impl Iterator<Item = I> {
293+
pub fn all_indices(&self) -> impl Iterator<Item = I> + use<I, T> {
294294
self.vector.indices()
295295
}
296296

charon/src/transform/expand_associated_types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ impl<'a> ComputeItemModifications<'a> {
775775
&'b mut self,
776776
clause: &TraitClause,
777777
clause_to_path: fn(TraitClauseId) -> TraitRefPath,
778-
) -> impl Iterator<Item = AssocTypePath> + use<'b> {
778+
) -> impl Iterator<Item = AssocTypePath> + use<'a, 'b> {
779779
let trait_id = clause.trait_.skip_binder.id;
780780
let clause_path = clause_to_path(clause.clause_id);
781781
self.compute_extra_params_for_trait(trait_id)

0 commit comments

Comments
 (0)