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. 12
      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"] categories = ["parser-implementations", "wasm"]
license = "Unlicense/MIT" license = "Unlicense/MIT"
exclude = ["../.vscode/*", "../Dockerfile", "../Makefile", "../.editorConfig"] exclude = ["../.vscode/*", "../Dockerfile", "../Makefile", "../.editorConfig"]
edition = "2018" edition = "2021"
[features] [features]
profiler = ["measureme"] 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 /// Additionally to the wrapped unsigned value it returns the converted `bits` argument, so it
/// can be reused from the `as_int_n` method. /// can be reused from the `as_int_n` method.
fn calculate_as_uint_n(args: &[JsValue], context: &mut Context) -> JsResult<(JsBigInt, u32)> { 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 bits_arg = args.get_or_undefined(0);
let bigint_arg = args.get_or_undefined(1); let bigint_arg = args.get_or_undefined(1);

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

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

2
boa_cli/Cargo.toml

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

2
boa_tester/Cargo.toml

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

2
boa_unicode/Cargo.toml

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

2
boa_wasm/Cargo.toml

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

Loading…
Cancel
Save