Skip to content

Commit 6138cb4

Browse files
authored
Merge pull request RustPython#3357 from coolreader18/edition2021
Migrate to 2021 edition
2 parents a09b440 + 53c261a commit 6138cb4

41 files changed

Lines changed: 34 additions & 56 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ jobs:
108108
- name: Prepare repository for redox compilation
109109
run: bash scripts/redox/uncomment-cargo.sh
110110
- name: Check compilation for Redox
111+
if: false # FIXME: redoxer toolchain is from ~july 2021, edition2021 isn't stabilized
111112
uses: coolreader18/redoxer-action@v1
112113
with:
113114
command: check
@@ -249,6 +250,7 @@ jobs:
249250
runs-on: ubuntu-latest
250251
steps:
251252
- uses: actions/checkout@v2
253+
- uses: actions-rs/toolchain@v1
252254
- name: Cache cargo dependencies
253255
uses: actions/cache@v2
254256
with:

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
# REDOX START
2+
# cargo-features = ["edition2021"]
3+
# REDOX END
14
[package]
25
name = "rustpython"
36
version = "0.1.2"
47
authors = ["RustPython Team"]
5-
edition = "2018"
8+
edition = "2021"
69
description = "A python interpreter written in rust."
710
repository = "https://github.com/RustPython/RustPython"
811
license = "MIT"

ast/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "rustpython-ast"
33
version = "0.1.0"
44
authors = ["RustPython Team"]
5-
edition = "2018"
5+
edition = "2021"
66

77
[features]
88
default = ["constant-optimization", "fold"]

bytecode/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "rustpython-bytecode"
33
description = "RustPython specific bytecode."
44
version = "0.1.2"
55
authors = ["RustPython Team"]
6-
edition = "2018"
6+
edition = "2021"
77
repository = "https://github.com/RustPython/RustPython"
88
license = "MIT"
99

bytecode/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1251,7 +1251,6 @@ pub struct FrozenModule<C: Constant = ConstantData> {
12511251
pub mod frozen_lib {
12521252
use super::*;
12531253
use bincode::{options, Options};
1254-
use std::convert::TryInto;
12551254
use std::io;
12561255

12571256
/// Decode a library to a iterable of frozen modules

common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "rustpython-common"
33
version = "0.0.0"
44
authors = ["RustPython Team"]
5-
edition = "2018"
5+
edition = "2021"
66

77
[features]
88
threading = ["parking_lot"]

common/src/hash.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use num_bigint::BigInt;
22
use num_complex::Complex64;
33
use num_traits::ToPrimitive;
44
use siphasher::sip::SipHasher24;
5-
use std::convert::TryInto;
65
use std::hash::{BuildHasher, Hash, Hasher};
76
use std::num::Wrapping;
87

compiler/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Compiler for python code into bytecode for the rustpython VM."
55
authors = ["RustPython Team"]
66
repository = "https://github.com/RustPython/RustPython"
77
license = "MIT"
8-
edition = "2018"
8+
edition = "2021"
99

1010
[dependencies]
1111
indexmap = "1.0"

compiler/porcelain/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "rustpython-compiler"
33
version = "0.1.2"
44
description = "A usability wrapper around rustpython-parser and rustpython-compiler-core"
55
authors = ["RustPython Team"]
6-
edition = "2018"
6+
edition = "2021"
77

88
[dependencies]
99
thiserror = "1.0"

derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Rust language extensions and macros specific to rustpython."
55
authors = ["RustPython Team"]
66
repository = "https://github.com/RustPython/RustPython"
77
license = "MIT"
8-
edition = "2018"
8+
edition = "2021"
99

1010
[lib]
1111
proc-macro = true

0 commit comments

Comments
 (0)