mirror of
https://github.com/swc-project/swc.git
synced 2024-11-24 02:06:08 +03:00
chore(common): Update rustc (#4828)
This commit is contained in:
parent
7f731a2ab2
commit
f847709787
@ -1,3 +1,5 @@
|
||||
#![allow(clippy::derive_partial_eq_without_eq)]
|
||||
|
||||
use swc_atoms::JsWord;
|
||||
use swc_common::{ast_node, Span};
|
||||
|
||||
|
@ -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};
|
||||
|
@ -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)
|
||||
|
@ -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) => {
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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",
|
||||
|
@ -1,3 +1,5 @@
|
||||
#![allow(clippy::derive_partial_eq_without_eq)]
|
||||
|
||||
use serde_json::from_str;
|
||||
use swc_common::ast_serde;
|
||||
|
||||
|
@ -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};
|
||||
|
@ -1,3 +1,5 @@
|
||||
#![allow(clippy::derive_partial_eq_without_eq)]
|
||||
|
||||
use std::borrow::Cow;
|
||||
|
||||
use swc_atoms::JsWord;
|
||||
|
@ -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,
|
||||
|
@ -2445,7 +2445,7 @@ where
|
||||
}
|
||||
};
|
||||
|
||||
unicode_range.push_str(&number.to_string());
|
||||
unicode_range.push_str(&number);
|
||||
|
||||
match cur!(self) {
|
||||
tok!("?") => {
|
||||
|
@ -445,7 +445,7 @@ struct Prefixer {
|
||||
added_declarations: Vec<Declaration>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum Prefix {
|
||||
Webkit,
|
||||
Moz,
|
||||
|
@ -1,3 +1,5 @@
|
||||
#![allow(unused)]
|
||||
|
||||
macro_rules! opt_leading_space {
|
||||
($emitter:expr, $e:expr) => {
|
||||
if let Some(ref e) = $e {
|
||||
|
@ -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 {
|
||||
|
@ -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,
|
||||
|
@ -1,3 +1,4 @@
|
||||
#[allow(unused)]
|
||||
macro_rules! tok {
|
||||
('`') => {
|
||||
crate::token::Token::BackQuote
|
||||
|
@ -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),
|
||||
|
@ -79,6 +79,7 @@ macro_rules! is {
|
||||
};
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
macro_rules! peeked_is {
|
||||
($p:expr, BindingIdent) => {{
|
||||
let ctx = $p.ctx();
|
||||
|
@ -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,
|
||||
|
@ -32,9 +32,6 @@ macro_rules! test_stmt {
|
||||
true,
|
||||
)
|
||||
};
|
||||
($l:expr, $r:expr,) => {
|
||||
test_expr!($l, $r);
|
||||
};
|
||||
}
|
||||
|
||||
fn test(src: &str, expected: &str) {
|
||||
|
@ -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::*;
|
||||
|
@ -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,
|
||||
|
@ -1,3 +1,5 @@
|
||||
#![allow(clippy::derive_partial_eq_without_eq)]
|
||||
|
||||
use std::borrow::Cow;
|
||||
|
||||
use swc_atoms::JsWord;
|
||||
|
@ -1 +1 @@
|
||||
nightly-2022-04-12
|
||||
nightly-2022-05-28
|
Loading…
Reference in New Issue
Block a user