Browse Source

Respect rust 1.56 (#1681)

* Style: Respect rust1.56

* Chore: Change to 2021 edition
pull/1682/head
João Borges 3 years ago committed by GitHub
parent
commit
8aeef422ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      boa/Cargo.toml
  2. 2
      boa/src/builtins/bigint/mod.rs
  3. 10
      boa/src/syntax/parser/expression/assignment/yield.rs
  4. 2
      boa_cli/Cargo.toml
  5. 2
      boa_tester/Cargo.toml
  6. 2
      boa_unicode/Cargo.toml
  7. 2
      boa_wasm/Cargo.toml

2
boa/Cargo.toml

@ -8,7 +8,7 @@ keywords = ["javascript", "compiler", "lexer", "parser", "js"]
categories = ["parser-implementations", "wasm"]
license = "Unlicense/MIT"
exclude = ["../.vscode/*", "../Dockerfile", "../Makefile", "../.editorConfig"]
edition = "2018"
edition = "2021"
[features]
profiler = ["measureme"]

2
boa/src/builtins/bigint/mod.rs

@ -259,8 +259,6 @@ impl BigInt {
/// Additionally to the wrapped unsigned value it returns the converted `bits` argument, so it
/// can be reused from the `as_int_n` method.
fn calculate_as_uint_n(args: &[JsValue], context: &mut Context) -> JsResult<(JsBigInt, u32)> {
use std::convert::TryFrom;
let bits_arg = args.get_or_undefined(0);
let bigint_arg = args.get_or_undefined(1);

10
boa/src/syntax/parser/expression/assignment/yield.rs

@ -74,17 +74,11 @@ where
if let TokenKind::Punctuator(Punctuator::Mul) = next_token.kind() {
cursor.expect(TokenKind::Punctuator(Punctuator::Mul), "token disappeared")?;
delegate = true;
}
expr = Some(
AssignmentExpression::new(self.allow_in, true, self.allow_await)
.parse(cursor)?,
);
} else {
expr = Some(
AssignmentExpression::new(self.allow_in, true, self.allow_await)
.parse(cursor)?,
AssignmentExpression::new(self.allow_in, true, self.allow_await).parse(cursor)?,
);
}
}
Ok(Node::Yield(Yield::new::<Node, Option<Node>>(
expr, delegate,

2
boa_cli/Cargo.toml

@ -8,7 +8,7 @@ keywords = ["javascript", "compiler", "lexer", "parser", "js", "cli"]
categories = ["command-line-utilities"]
license = "Unlicense/MIT"
exclude = ["../.vscode/*", "../Dockerfile", "../Makefile", "../.editorConfig"]
edition = "2018"
edition = "2021"
default-run = "boa"
[dependencies]

2
boa_tester/Cargo.toml

@ -8,7 +8,7 @@ keywords = ["javascript", "compiler", "test262", "tester", "js"]
categories = ["parser-implementations", "wasm"]
license = "Unlicense/MIT"
exclude = ["../.vscode/*", "../Dockerfile", "../Makefile", "../.editorConfig"]
edition = "2018"
edition = "2021"
[dependencies]
Boa = { path = "../boa" }

2
boa_unicode/Cargo.toml

@ -8,7 +8,7 @@ keywords = ["javascript", "compiler", "lexer", "parser", "unicode"]
categories = ["parsing"]
license = "Unlicense/MIT"
exclude = ["../.vscode/*", "../Dockerfile", "../Makefile", "../.editorConfig"]
edition = "2018"
edition = "2021"
[dependencies]
unicode-general-category = "0.4.0"

2
boa_wasm/Cargo.toml

@ -8,7 +8,7 @@ keywords = ["javascript", "compiler", "lexer", "parser", "js"]
categories = ["wasm"]
license = "Unlicense/MIT"
exclude = ["../.vscode/*", "../Dockerfile", "../Makefile", "../.editorConfig"]
edition = "2018"
edition = "2021"
[dependencies]
Boa = { path = "../boa", features = ["console"] }

Loading…
Cancel
Save