chore(common): Update rustc (#4828)

This commit is contained in:
Donny/강동윤 2022-05-28 16:07:58 +09:00 committed by GitHub
parent 7f731a2ab2
commit f847709787
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 37 additions and 21 deletions

View File

@ -1,3 +1,5 @@
#![allow(clippy::derive_partial_eq_without_eq)]
use swc_atoms::JsWord;
use swc_common::{ast_node, Span};

View File

@ -1,3 +1,5 @@
#![allow(clippy::derive_partial_eq_without_eq)]
use ast_node::ast_node;
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use serde::{Deserialize, Serialize};

View File

@ -14,7 +14,7 @@ use super::{snippet::Style, Applicability, CodeSuggestion, Level, Substitution,
use crate::syntax_pos::{MultiSpan, Span};
#[must_use]
#[derive(Clone, Debug, PartialEq, Hash)]
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
#[cfg_attr(
feature = "diagnostic-serde",
derive(serde::Serialize, serde::Deserialize)
@ -47,7 +47,7 @@ pub enum DiagnosticId {
}
/// For example a note attached to an error.
#[derive(Clone, Debug, PartialEq, Hash)]
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
#[cfg_attr(
feature = "diagnostic-serde",
derive(serde::Serialize, serde::Deserialize)

View File

@ -44,6 +44,7 @@ pub struct DiagnosticBuilder<'a> {
/// `diagnostic`, because the return type would be a `&Diagnostic`
/// instead of a `&DiagnosticBuilder<'a>`. This `forward!` macro makes
/// it easy to declare such methods on the builder.
#[allow(unused)]
macro_rules! forward {
// Forward pattern for &self -> &Self
(pub fn $n:ident(&self, $($name:ident: $ty:ty),* $(,)*) -> &Self) => {

View File

@ -40,7 +40,7 @@ mod lock;
mod snippet;
mod styled_buffer;
#[derive(Copy, Clone, Debug, PartialEq, Hash)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
#[cfg_attr(
feature = "diagnostic-serde",
derive(serde::Serialize, serde::Deserialize)
@ -56,7 +56,7 @@ pub enum Applicability {
Unspecified,
}
#[derive(Clone, Debug, PartialEq, Hash)]
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
#[cfg_attr(
feature = "diagnostic-serde",
derive(serde::Serialize, serde::Deserialize)
@ -106,7 +106,7 @@ pub struct CodeSuggestion {
pub applicability: Applicability,
}
#[derive(Clone, Debug, PartialEq, Hash)]
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
/// See the docs on `CodeSuggestion::substitutions`
#[cfg_attr(
feature = "diagnostic-serde",
@ -120,7 +120,7 @@ pub struct Substitution {
pub parts: Vec<SubstitutionPart>,
}
#[derive(Clone, Debug, PartialEq, Hash)]
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
#[cfg_attr(
feature = "diagnostic-serde",
derive(serde::Serialize, serde::Deserialize)
@ -866,7 +866,7 @@ impl Handler {
}
}
#[derive(Copy, PartialEq, Clone, Hash, Debug)]
#[derive(Copy, PartialEq, Eq, Clone, Hash, Debug)]
#[cfg_attr(
feature = "diagnostic-serde",
derive(serde::Serialize, serde::Deserialize)

View File

@ -175,7 +175,7 @@ pub struct StyledString {
}
#[allow(clippy::enum_variant_names)]
#[derive(Copy, Clone, Debug, PartialEq, Hash)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
#[cfg_attr(
feature = "diagnostic-serde",
derive(serde::Serialize, serde::Deserialize)

View File

@ -10,7 +10,7 @@ use anyhow::Error;
use crate::{syntax_pos::Mark, SyntaxContext};
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
#[cfg_attr(
feature = "plugin-base",

View File

@ -1,3 +1,5 @@
#![allow(clippy::derive_partial_eq_without_eq)]
use serde_json::from_str;
use swc_common::ast_serde;

View File

@ -1,3 +1,5 @@
#![allow(clippy::derive_partial_eq_without_eq)]
//! Test that `#[span]` and `#[fold]` can be used at same time.
use serde::{self, Deserialize, Serialize};
use swc_common::{self, ast_node, Span, Spanned};

View File

@ -1,3 +1,5 @@
#![allow(clippy::derive_partial_eq_without_eq)]
use std::borrow::Cow;
use swc_atoms::JsWord;

View File

@ -28,7 +28,7 @@ pub struct ParserConfig {
pub allow_wrong_line_comments: bool,
}
#[derive(Debug, Clone, Copy, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum BlockContentsGrammar {
NoGrammar,
StyleBlock,

View File

@ -2445,7 +2445,7 @@ where
}
};
unicode_range.push_str(&number.to_string());
unicode_range.push_str(&number);
match cur!(self) {
tok!("?") => {

View File

@ -445,7 +445,7 @@ struct Prefixer {
added_declarations: Vec<Declaration>,
}
#[derive(Clone, Debug, PartialEq)]
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum Prefix {
Webkit,
Moz,

View File

@ -1,3 +1,5 @@
#![allow(unused)]
macro_rules! opt_leading_space {
($emitter:expr, $e:expr) => {
if let Some(ref e) = $e {

View File

@ -2884,7 +2884,7 @@ fn is_left_access_to_arguments(l: &PatOrExpr) -> bool {
}
}
#[derive(Debug, Default, PartialEq)]
#[derive(Debug, Default, PartialEq, Eq)]
struct SynthesizedStmts(Vec<Stmt>);
impl SynthesizedStmts {

View File

@ -50,7 +50,7 @@ struct EvalStore {
cache: AHashMap<Id, Box<Expr>>,
}
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum EvalResult {
Lit(Lit),
Undefined,

View File

@ -1,3 +1,4 @@
#[allow(unused)]
macro_rules! tok {
('`') => {
crate::token::Token::BackQuote

View File

@ -1791,6 +1791,7 @@ impl<I: Tokens> Parser<I> {
}
#[ast_node]
#[allow(clippy::derive_partial_eq_without_eq)]
pub(in crate::parser) enum PatOrExprOrSpread {
#[tag("ExprOrSpread")]
ExprOrSpread(ExprOrSpread),

View File

@ -79,6 +79,7 @@ macro_rules! is {
};
}
#[allow(unused)]
macro_rules! peeked_is {
($p:expr, BindingIdent) => {{
let ctx = $p.ctx();

View File

@ -61,7 +61,7 @@ impl PrivateRecord {
}
}
#[derive(Copy, Clone, PartialEq, Default)]
#[derive(Copy, Clone, PartialEq, Default, Eq)]
pub(super) struct PrivateKind {
pub is_static: bool,
pub is_method: bool,

View File

@ -32,9 +32,6 @@ macro_rules! test_stmt {
true,
)
};
($l:expr, $r:expr,) => {
test_expr!($l, $r);
};
}
fn test(src: &str, expected: &str) {

View File

@ -1,6 +1,7 @@
#![deny(clippy::all)]
#![allow(clippy::large_enum_variant)]
#![allow(clippy::derive_partial_eq_without_eq)]
#![allow(clippy::enum_variant_names)]
#![allow(clippy::large_enum_variant)]
pub use class::*;
pub use comment::*;

View File

@ -72,7 +72,7 @@ pub trait NodeTrait: Copy + Ord + Hash {}
impl<N> NodeTrait for N where N: Copy + Ord + Hash {}
// non-repr(usize) version of Direction
#[derive(Copy, Clone, Debug, PartialEq)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
enum CompactDirection {
Outgoing,
Incoming,

View File

@ -1,3 +1,5 @@
#![allow(clippy::derive_partial_eq_without_eq)]
use std::borrow::Cow;
use swc_atoms::JsWord;

View File

@ -1 +1 @@
nightly-2022-04-12
nightly-2022-05-28