Upgrade to rust toolchain 1.82.0 (#4245)
* Upgrade to rust toolchain 1.82.0 * Fix lint about variant being too large * Fix lint about Err variant being too large
This commit is contained in:
@ -12,7 +12,7 @@ fn basic() {
|
||||
let expected = Program {
|
||||
start: 0,
|
||||
end: 11,
|
||||
body: vec![BodyItem::VariableDeclaration(VariableDeclaration {
|
||||
body: vec![BodyItem::VariableDeclaration(Box::new(VariableDeclaration {
|
||||
start: 0,
|
||||
end: 11,
|
||||
declarations: vec![VariableDeclarator {
|
||||
@ -36,7 +36,7 @@ fn basic() {
|
||||
visibility: ItemVisibility::Default,
|
||||
kind: VariableKind::Const,
|
||||
digest: None,
|
||||
})],
|
||||
}))],
|
||||
non_code_meta: NonCodeMeta::default(),
|
||||
digest: None,
|
||||
};
|
||||
|
@ -454,7 +454,7 @@ pub(crate) use impl_value_meta;
|
||||
pub enum BodyItem {
|
||||
ImportStatement(Box<ImportStatement>),
|
||||
ExpressionStatement(ExpressionStatement),
|
||||
VariableDeclaration(VariableDeclaration),
|
||||
VariableDeclaration(Box<VariableDeclaration>),
|
||||
ReturnStatement(ReturnStatement),
|
||||
}
|
||||
|
||||
@ -2719,7 +2719,7 @@ pub struct FunctionExpression {
|
||||
impl_value_meta!(FunctionExpression);
|
||||
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
pub struct RequiredParamAfterOptionalParam(pub Parameter);
|
||||
pub struct RequiredParamAfterOptionalParam(pub Box<Parameter>);
|
||||
|
||||
impl std::fmt::Display for RequiredParamAfterOptionalParam {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
@ -2751,7 +2751,7 @@ impl FunctionExpression {
|
||||
if param.optional {
|
||||
found_optional = true;
|
||||
} else if found_optional {
|
||||
return Err(RequiredParamAfterOptionalParam(param.clone()));
|
||||
return Err(RequiredParamAfterOptionalParam(Box::new(param.clone())));
|
||||
}
|
||||
}
|
||||
let boundary = self.params.partition_point(|param| !param.optional);
|
||||
|
@ -1342,7 +1342,7 @@ fn declaration_keyword(i: TokenSlice) -> PResult<(VariableKind, Token)> {
|
||||
}
|
||||
|
||||
/// Parse a variable/constant declaration.
|
||||
fn declaration(i: TokenSlice) -> PResult<VariableDeclaration> {
|
||||
fn declaration(i: TokenSlice) -> PResult<Box<VariableDeclaration>> {
|
||||
let (visibility, visibility_token) = opt(terminated(item_visibility, whitespace))
|
||||
.parse_next(i)?
|
||||
.map_or((ItemVisibility::Default, None), |pair| (pair.0, Some(pair.1)));
|
||||
@ -1404,7 +1404,7 @@ fn declaration(i: TokenSlice) -> PResult<VariableDeclaration> {
|
||||
.map_err(|e| e.cut())?;
|
||||
|
||||
let end = val.end();
|
||||
Ok(VariableDeclaration {
|
||||
Ok(Box::new(VariableDeclaration {
|
||||
start,
|
||||
end,
|
||||
declarations: vec![VariableDeclarator {
|
||||
@ -1417,7 +1417,7 @@ fn declaration(i: TokenSlice) -> PResult<VariableDeclaration> {
|
||||
visibility,
|
||||
kind,
|
||||
digest: None,
|
||||
})
|
||||
}))
|
||||
}
|
||||
|
||||
impl TryFrom<Token> for Identifier {
|
||||
|
@ -290,7 +290,7 @@ where
|
||||
walk_value(&xs.expression, f)
|
||||
}
|
||||
BodyItem::VariableDeclaration(vd) => {
|
||||
if !f.walk(vd.into())? {
|
||||
if !f.walk(vd.as_ref().into())? {
|
||||
return Ok(false);
|
||||
}
|
||||
for dec in &vd.declarations {
|
||||
|
@ -1,3 +1,3 @@
|
||||
[toolchain]
|
||||
channel = "1.81.0"
|
||||
channel = "1.82.0"
|
||||
components = ["clippy", "rustfmt"]
|
||||
|
Reference in New Issue
Block a user