Skip to content

Commit a40749b

Browse files
committed
chore: Upgrade packages edition to 2024
Can't upgrade `rusty_parser` due to a timeline issue that needs to be investigated. Introducing a `rusty_pc` package to move the parser combinator framework into.
1 parent b3a50d9 commit a40749b

11 files changed

Lines changed: 35 additions & 5 deletions

File tree

Cargo.lock

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ members = [
55
"rusty_common",
66
"rusty_linter",
77
"rusty_parser",
8+
"rusty_pc",
89
"rusty_variant"
910
]

rusty_basic/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "rusty_basic"
33
version = "0.8.0"
44
authors = ["Nikolaos Georgiou <nikolaos.georgiou@gmail.com>"]
5-
edition = "2018"
5+
edition = "2024"
66

77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

rusty_basic/src/interpreter/default_stdlib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ impl Stdlib for DefaultStdlib {
1515
}
1616

1717
fn set_env_var(&mut self, name: String, value: String) {
18-
std::env::set_var(name, value);
18+
unsafe {
19+
std::env::set_var(name, value);
20+
}
1921
}
2022
}

rusty_common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "rusty_common"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

rusty_linter/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "rusty_linter"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

rusty_parser/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ edition = "2021"
77

88
[dependencies]
99
rusty_common = { path = "../rusty_common" }
10+
rusty_pc = { path = "../rusty_pc" }
1011
# TODO parser should not depend on variant
1112
rusty_variant = { path = "../rusty_variant" }

rusty_parser/src/specific/core/var_name.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ where
113113
P: Parser<RcStringView, Output = T, Error = ParseError> + 'static,
114114
{
115115
Seq2::new(name_with_dots(), array_p).then_with(
116+
// TODO the name_chain prevents upgrading to `edition = 2024`
116117
move |(name, _)| name_chain(name, built_in_extended_factory),
117118
|(name, array), var_type| {
118119
let bare_name: BareName = name.to_bare_name();

rusty_pc/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "rusty_pc"
3+
version = "0.1.0"
4+
edition = "2024"
5+
6+
[dependencies]

rusty_pc/src/lib.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
pub fn add(left: u64, right: u64) -> u64 {
2+
left + right
3+
}
4+
5+
#[cfg(test)]
6+
mod tests {
7+
use super::*;
8+
9+
#[test]
10+
fn it_works() {
11+
let result = add(2, 2);
12+
assert_eq!(result, 4);
13+
}
14+
}

0 commit comments

Comments
 (0)