mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 10:44:36 +08:00
Migrate to 2021 edition
This commit is contained in:
16 files changed
+18
-21
No files matched your search
+1
-1
@@ -2,7 +2,7 @@
|
||||
name = "rustpython"
|
||||
version = "0.1.2"
|
||||
authors = ["RustPython Team"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
description = "A python interpreter written in rust."
|
||||
repository = "https://github.com/RustPython/RustPython"
|
||||
license = "MIT"
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
name = "rustpython-ast"
|
||||
version = "0.1.0"
|
||||
authors = ["RustPython Team"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
default = ["constant-optimization", "fold"]
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ name = "rustpython-bytecode"
|
||||
description = "RustPython specific bytecode."
|
||||
version = "0.1.2"
|
||||
authors = ["RustPython Team"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
repository = "https://github.com/RustPython/RustPython"
|
||||
license = "MIT"
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
name = "rustpython-common"
|
||||
version = "0.0.0"
|
||||
authors = ["RustPython Team"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
threading = ["parking_lot"]
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ description = "Compiler for python code into bytecode for the rustpython VM."
|
||||
authors = ["RustPython Team"]
|
||||
repository = "https://github.com/RustPython/RustPython"
|
||||
license = "MIT"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
indexmap = "1.0"
|
||||
|
||||
@@ -3,7 +3,7 @@ name = "rustpython-compiler"
|
||||
version = "0.1.2"
|
||||
description = "A usability wrapper around rustpython-parser and rustpython-compiler-core"
|
||||
authors = ["RustPython Team"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
thiserror = "1.0"
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ description = "Rust language extensions and macros specific to rustpython."
|
||||
authors = ["RustPython Team"]
|
||||
repository = "https://github.com/RustPython/RustPython"
|
||||
license = "MIT"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
|
||||
@@ -185,17 +185,17 @@ fn generate_field((i, field): (usize, &Field)) -> Result<TokenStream> {
|
||||
let file_output = match attr.kind {
|
||||
ParameterKind::PositionalOnly => {
|
||||
quote! {
|
||||
#fieldname: args.take_positional()#middle#ending,
|
||||
#fieldname: args.take_positional()#middle #ending,
|
||||
}
|
||||
}
|
||||
ParameterKind::PositionalOrKeyword => {
|
||||
quote! {
|
||||
#fieldname: args.take_positional_keyword(#pyname)#middle#ending,
|
||||
#fieldname: args.take_positional_keyword(#pyname)#middle #ending,
|
||||
}
|
||||
}
|
||||
ParameterKind::KeywordOnly => {
|
||||
quote! {
|
||||
#fieldname: args.take_keyword(#pyname)#middle#ending,
|
||||
#fieldname: args.take_keyword(#pyname)#middle #ending,
|
||||
}
|
||||
}
|
||||
ParameterKind::Flatten => unreachable!(),
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ description = "Experimental JIT(just in time) compiler for python code."
|
||||
authors = [ "RustPython Team" ]
|
||||
repository = "https://github.com/RustPython/RustPython"
|
||||
license = "MIT"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
autotests = false
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ authors = [ "RustPython Team" ]
|
||||
build = "build.rs"
|
||||
repository = "https://github.com/RustPython/RustPython"
|
||||
license = "MIT"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[build-dependencies]
|
||||
lalrpop = "0.19.6"
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "rustpython-stdlib"
|
||||
version = "0.1.2"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ description = "Rust Python virtual machine."
|
||||
authors = ["RustPython Team"]
|
||||
repository = "https://github.com/RustPython/RustPython"
|
||||
license = "MIT"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
include = ["src/**/*.rs", "Cargo.toml", "build.rs", "Lib/**/*.py"]
|
||||
|
||||
[features]
|
||||
|
||||
@@ -5,7 +5,7 @@ authors = ["RustPython Team"]
|
||||
description = "A subset of the Python standard library for use with RustPython"
|
||||
repository = "https://github.com/RustPython/RustPython"
|
||||
license-file = "Lib/PSF-LICENSE"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
include = ["Cargo.toml", "src/**/*.rs", "Lib/", "!Lib/**/test/", "!Lib/**/*.pyc"]
|
||||
|
||||
[features]
|
||||
|
||||
+1
-4
@@ -1878,14 +1878,11 @@ impl ExecutingFrame<'_> {
|
||||
self.state.stack[self.state.stack.len() - depth as usize - 1].clone()
|
||||
}
|
||||
|
||||
// redox still has an old nightly, and edition 2021 won't be out for a while
|
||||
#[allow(renamed_and_removed_lints)]
|
||||
#[allow(non_fmt_panic)]
|
||||
#[cold]
|
||||
#[inline(never)]
|
||||
fn fatal(&self, msg: &'static str) -> ! {
|
||||
dbg!(self);
|
||||
panic!(msg)
|
||||
panic!("{}", msg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ authors = ["RustPython Team"]
|
||||
license = "MIT"
|
||||
description = "A Python-3 (CPython >= 3.5.0) Interpreter written in Rust, compiled to WASM"
|
||||
repository = "https://github.com/RustPython/RustPython/tree/main/wasm/lib"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib", "rlib"]
|
||||
|
||||
Reference in new issue
Block a user