build(cargo): Update rustc to nightly-2024-04-16 (#8870)

This commit is contained in:
Donny/강동윤 2024-04-17 14:42:11 +09:00 committed by GitHub
parent 036414af12
commit f9459a8adf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
26 changed files with 28 additions and 53 deletions

4
Cargo.lock generated
View File

@ -2852,9 +2852,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
version = "1.0.79"
version = "1.0.81"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e"
checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba"
dependencies = [
"unicode-ident",
]

10
bindings/Cargo.lock generated
View File

@ -219,7 +219,6 @@ dependencies = [
"napi-derive",
"node_macro_deps",
"path-clean 0.1.0",
"proc-macro2",
"serde",
"serde_json",
"swc_core",
@ -236,7 +235,6 @@ version = "1.4.15-nightly-20240416.4"
dependencies = [
"anyhow",
"getrandom",
"proc-macro2",
"serde",
"serde-wasm-bindgen",
"swc_core",
@ -276,7 +274,6 @@ dependencies = [
"napi-derive",
"node_macro_deps",
"path-clean 0.1.0",
"proc-macro2",
"serde",
"serde_json",
"sourcemap",
@ -298,7 +295,6 @@ version = "1.4.15-nightly-20240416.4"
dependencies = [
"anyhow",
"getrandom",
"proc-macro2",
"serde",
"serde-wasm-bindgen",
"swc_core",
@ -1832,7 +1828,6 @@ checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
name = "node_macro_deps"
version = "0.1.0"
dependencies = [
"proc-macro2",
"quote",
]
@ -2223,9 +2218,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
version = "1.0.79"
version = "1.0.81"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e"
checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba"
dependencies = [
"unicode-ident",
]
@ -3081,7 +3076,6 @@ name = "swc_cli"
version = "0.91.220"
dependencies = [
"anyhow",
"proc-macro2",
"swc_cli_impl",
]

View File

@ -44,7 +44,6 @@ napi-derive = { version = "2", default-features = false, features = [
] }
node_macro_deps = { path = "../node_macro_deps" }
path-clean = "0.1"
proc-macro2 = "=1.0.79"
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["unbounded_depth"] }
tracing = { version = "0.1.37", features = ["release_max_level_info"] }

View File

@ -33,7 +33,6 @@ plugin = []
[dependencies]
anyhow = "1.0.66"
getrandom = { version = "0.2.10", features = ["js"] }
proc-macro2 = "=1.0.79"
serde = { version = "1", features = ["derive"] }
serde-wasm-bindgen = "0.4.5"
swc_core = { version = "0.90.33", features = [

View File

@ -27,7 +27,6 @@ napi-derive = { version = "2", default-features = false, features = [
] }
node_macro_deps = { path = "../node_macro_deps" }
path-clean = "0.1"
proc-macro2 = "=1.0.79"
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["unbounded_depth"] }
sourcemap = "8.0.0"

View File

@ -33,7 +33,6 @@ plugin = []
[dependencies]
anyhow = "1.0.66"
getrandom = { version = "0.2.10", features = ["js"] }
proc-macro2 = "=1.0.79"
serde = { version = "1", features = ["derive"] }
serde-wasm-bindgen = "0.4.5"
swc_core = { version = "0.90.33", features = [

View File

@ -12,5 +12,4 @@ bench = false
proc-macro = true
[dependencies]
proc-macro2 = "=1.0.79"
quote = "1"
quote = "1"

View File

@ -19,5 +19,4 @@ plugin = ["swc_cli_impl/plugin"]
[dependencies]
anyhow = "1.0.66"
proc-macro2 = "=1.0.79"
swc_cli_impl = "0.8.25"

View File

@ -3,7 +3,6 @@ use std::{
env,
path::{Path, PathBuf},
sync::Arc,
usize,
};
use anyhow::{bail, Context, Error};

View File

@ -874,9 +874,7 @@ impl SourceMap {
// Disregard indexes that are at the start or end of their spans, they can't fit
// bigger characters.
if (!forwards && end_index == usize::min_value())
|| (forwards && start_index == usize::max_value())
{
if (!forwards && end_index == usize::MIN) || (forwards && start_index == usize::MAX) {
debug!("find_width_of_character_at_span: start or end of span, cannot be multibyte");
return 1;
}

View File

@ -39,7 +39,6 @@ napi-derive = { version = "2", default-features = false, features = [
"type-def",
] }
path-clean = "0.1"
proc-macro2 = "=1.0.79"
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["unbounded_depth"] }
tracing = { version = "0.1.37", features = ["release_max_level_info"] }

View File

@ -17,7 +17,6 @@ swc_v1 = []
[dependencies]
anyhow = "1.0.66"
browserslist-rs = { version = "0.13.0", features = ["wasm_bindgen"] }
proc-macro2 = "=1.0.79"
serde = { version = "1", features = ["derive"] }
serde-wasm-bindgen = "0.4.5"
swc_core = { path = "../../../../swc_core", features = [

View File

@ -1,5 +1,6 @@
#![deny(clippy::all)]
#![allow(clippy::needless_update)]
#![allow(non_local_definitions)]
pub use std::fmt::Result;
use std::{borrow::Cow, str, str::from_utf8};

View File

@ -317,7 +317,7 @@ pub fn hsl_to_rgb(hsl: [f64; 3]) -> [f64; 3] {
let k = (n + h / 30.0) % 12.0;
let a = s * f64::min(l, 1.0 - l);
l - a * f64::max(-1.0, f64::min(f64::min(k - 3.0, 9.0 - k), 1.0))
l - a * f64::min(k - 3.0, 9.0 - k).clamp(-1.0, 1.0)
};
r = f(0.0);
@ -339,7 +339,7 @@ pub fn to_rgb255(abc: [f64; 3]) -> [f64; 3] {
}
pub fn clamp_unit_f64(val: f64) -> u8 {
(val * 255.).round().max(0.).min(255.) as u8
(val * 255.).round().clamp(0., 255.) as u8
}
pub fn round_alpha(alpha: f64) -> f64 {

View File

@ -3,6 +3,7 @@
#![deny(unused)]
#![allow(clippy::match_like_matches_macro)]
#![allow(clippy::nonminimal_bool)]
#![allow(non_local_definitions)]
use std::{borrow::Cow, fmt::Write, io};

View File

@ -228,7 +228,7 @@ impl AssignFolder {
},
Some(init),
Some(if has_rest_pat(&elems) {
std::usize::MAX
usize::MAX
} else {
elems.len()
}),
@ -721,7 +721,7 @@ impl VisitMut for AssignFolder {
&mut self.vars,
None,
Some(if has_rest_pat(elems) {
std::usize::MAX
usize::MAX
} else {
elems.len()
}),

View File

@ -536,7 +536,7 @@ impl<'a> Lexer<'a> {
#[cfg(test)]
mod tests {
use std::{f64::INFINITY, panic};
use std::panic;
use super::*;
@ -576,7 +576,7 @@ mod tests {
0000000000000000000000000000000000000000000000000000";
#[test]
fn num_inf() {
assert_eq!(num(LONG), (INFINITY, LONG.into()));
assert_eq!(num(LONG), (f64::INFINITY, LONG.into()));
}
/// Number >= 2^53
@ -625,7 +625,7 @@ mod tests {
assert_eq!(
num(LARGE_POSITIVE_EXP),
(INFINITY, LARGE_POSITIVE_EXP.into())
(f64::INFINITY, LARGE_POSITIVE_EXP.into())
);
assert_eq!(num(LARGE_NEGATIVE_EXP), (0.0, LARGE_NEGATIVE_EXP.into()));
assert_eq!(

View File

@ -1,5 +1,3 @@
use std::usize;
use serde_json::Value;
use swc_common::{util::take::Take, Spanned, DUMMY_SP};
use swc_ecma_ast::*;

View File

@ -11,13 +11,7 @@ pub extern crate swc_ecma_ast;
#[doc(hidden)]
pub extern crate swc_common;
use std::{
borrow::Cow,
f64::{INFINITY, NAN},
hash::Hash,
num::FpCategory,
ops::Add,
};
use std::{borrow::Cow, hash::Hash, num::FpCategory, ops::Add};
use rustc_hash::FxHashMap;
use swc_atoms::JsWord;
@ -891,8 +885,8 @@ pub trait ExprExt {
_ => return (Pure, Unknown),
},
Expr::Ident(Ident { sym, span, .. }) => match &**sym {
"undefined" | "NaN" if span.ctxt == ctx.unresolved_ctxt => NAN,
"Infinity" if span.ctxt == ctx.unresolved_ctxt => INFINITY,
"undefined" | "NaN" if span.ctxt == ctx.unresolved_ctxt => f64::NAN,
"Infinity" if span.ctxt == ctx.unresolved_ctxt => f64::INFINITY,
_ => return (Pure, Unknown),
},
Expr::Unary(UnaryExpr {
@ -908,7 +902,7 @@ pub trait ExprExt {
}) if &**sym == "Infinity" && span.ctxt == ctx.unresolved_ctxt
) =>
{
-INFINITY
-f64::INFINITY
}
Expr::Unary(UnaryExpr {
op: op!("!"),
@ -930,9 +924,9 @@ pub trait ExprExt {
..
}) => {
if arg.may_have_side_effects(ctx) {
return (MayBeImpure, Known(NAN));
return (MayBeImpure, Known(f64::NAN));
} else {
NAN
f64::NAN
}
}
@ -1578,19 +1572,19 @@ pub fn num_from_str(s: &str) -> Value<f64> {
b"0x" | b"0X" => {
return match u64::from_str_radix(&s[2..], 16) {
Ok(n) => Known(n as f64),
Err(_) => Known(NAN),
Err(_) => Known(f64::NAN),
}
}
b"0o" | b"0O" => {
return match u64::from_str_radix(&s[2..], 8) {
Ok(n) => Known(n as f64),
Err(_) => Known(NAN),
Err(_) => Known(f64::NAN),
};
}
b"0b" | b"0B" => {
return match u64::from_str_radix(&s[2..], 2) {
Ok(n) => Known(n as f64),
Err(_) => Known(NAN),
Err(_) => Known(f64::NAN),
};
}
_ => {}
@ -1611,7 +1605,7 @@ pub fn num_from_str(s: &str) -> Value<f64> {
_ => {}
}
Known(s.parse().ok().unwrap_or(NAN))
Known(s.parse().ok().unwrap_or(f64::NAN))
}
impl ExprExt for Box<Expr> {

View File

@ -1,6 +1,7 @@
#![deny(clippy::all)]
#![allow(clippy::needless_update)]
#![allow(clippy::match_like_matches_macro)]
#![allow(non_local_definitions)]
pub use std::fmt::Result;
use std::{borrow::Cow, iter::Peekable, str::Chars};

View File

@ -10,7 +10,6 @@ version = "0.1.0"
crate-type = ["cdylib"]
[dependencies]
proc-macro2 = "=1.0.79"
serde = "1"
swc_core = { path = "../../../../swc_core", features = [
"css_ast",

View File

@ -10,7 +10,6 @@ version = "0.1.0"
crate-type = ["cdylib"]
[dependencies]
proc-macro2 = "=1.0.79"
serde = "1"
swc_core = { path = "../../../../swc_core", features = [
"ecma_plugin_transform",

View File

@ -10,7 +10,6 @@ version = "0.1.0"
crate-type = ["cdylib"]
[dependencies]
proc-macro2 = "=1.0.79"
serde = "1"
swc_core = { path = "../../../../swc_core", features = [
"ecma_plugin_transform",

View File

@ -10,7 +10,6 @@ version = "0.1.0"
crate-type = ["cdylib"]
[dependencies]
proc-macro2 = "=1.0.79"
serde = "1"
swc_core = { path = "../../../../swc_core", features = [
"ecma_plugin_transform",

View File

@ -1,5 +1,6 @@
#![deny(clippy::all)]
#![allow(clippy::needless_update)]
#![allow(non_local_definitions)]
pub use std::fmt::Result;
use std::{iter::Peekable, str::Chars};

View File

@ -1 +1 @@
nightly-2024-04-03
nightly-2024-04-16