Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Bump rust to 1.64.0-nightly #6375

Merged
merged 8 commits into from
Jul 1, 2022
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions common/ast/src/ast/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,14 @@ pub enum TypeName {
Variant,
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum TrimWhere {
Both,
Leading,
Trailing,
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum BinaryOperator {
Plus,
Minus,
Expand Down Expand Up @@ -285,7 +285,7 @@ pub enum BinaryOperator {
BitwiseXor,
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum UnaryOperator {
Plus,
Minus,
Expand Down
2 changes: 1 addition & 1 deletion common/ast/src/ast/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub use statements::*;
use crate::parser::token::Token;

// Identifier of table name or column name.
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Identifier<'a> {
pub name: String,
pub quote: Option<char>,
Expand Down
8 changes: 4 additions & 4 deletions common/ast/src/ast/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub enum SetExpr<'a> {
SetOperation(Box<SetOperation<'a>>),
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum SetOperator {
Union,
Except,
Expand Down Expand Up @@ -112,7 +112,7 @@ pub type QualifiedName<'a> = Vec<Indirection<'a>>;

/// Indirection of a select result, like a part of `db.table.column`.
/// Can be a database name, table name, field name or wildcard star(`*`).
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Indirection<'a> {
// Field name
Identifier(Identifier<'a>),
Expand Down Expand Up @@ -152,7 +152,7 @@ pub enum TableReference<'a> {
Join(Join<'a>),
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct TableAlias<'a> {
pub name: Identifier<'a>,
pub columns: Vec<Identifier<'a>>,
Expand All @@ -166,7 +166,7 @@ pub struct Join<'a> {
pub right: Box<TableReference<'a>>,
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum JoinOperator {
Inner,
// Outer joins can not work with `JoinCondition::None`
Expand Down
14 changes: 7 additions & 7 deletions common/ast/src/ast/statements/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl Display for ShowDatabasesStmt<'_> {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ShowCreateDatabaseStmt<'a> {
pub catalog: Option<Identifier<'a>>,
pub database: Identifier<'a>,
Expand All @@ -50,7 +50,7 @@ impl Display for ShowCreateDatabaseStmt<'_> {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct CreateDatabaseStmt<'a> {
pub if_not_exists: bool,
pub catalog: Option<Identifier<'a>>,
Expand All @@ -74,7 +74,7 @@ impl Display for CreateDatabaseStmt<'_> {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct DropDatabaseStmt<'a> {
pub if_exists: bool,
pub catalog: Option<Identifier<'a>>,
Expand All @@ -93,7 +93,7 @@ impl Display for DropDatabaseStmt<'_> {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct AlterDatabaseStmt<'a> {
pub if_exists: bool,
pub catalog: Option<Identifier<'a>>,
Expand All @@ -118,12 +118,12 @@ impl Display for AlterDatabaseStmt<'_> {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum AlterDatabaseAction<'a> {
RenameDatabase { new_db: Identifier<'a> },
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum DatabaseEngine {
Default,
Github(String),
Expand All @@ -139,7 +139,7 @@ impl Display for DatabaseEngine {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct SQLProperty {
pub name: String,
pub value: String,
Expand Down
2 changes: 1 addition & 1 deletion common/ast/src/ast/statements/explain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum ExplainKind {
Syntax,
Graph,
Expand Down
2 changes: 1 addition & 1 deletion common/ast/src/ast/statements/kill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use std::fmt::Display;
use std::fmt::Formatter;

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum KillTarget {
Query,
Connection,
Expand Down
2 changes: 1 addition & 1 deletion common/ast/src/ast/statements/stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use std::collections::BTreeMap;
use std::fmt::Display;
use std::fmt::Formatter;

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct CreateStageStmt {
pub if_not_exists: bool,
pub stage_name: String,
Expand Down
22 changes: 11 additions & 11 deletions common/ast/src/ast/statements/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl Display for ShowTablesStmt<'_> {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ShowCreateTableStmt<'a> {
pub catalog: Option<Identifier<'a>>,
pub database: Option<Identifier<'a>>,
Expand Down Expand Up @@ -177,7 +177,7 @@ impl Display for CreateTableSource<'_> {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct DescribeTableStmt<'a> {
pub catalog: Option<Identifier<'a>>,
pub database: Option<Identifier<'a>>,
Expand All @@ -196,7 +196,7 @@ impl Display for DescribeTableStmt<'_> {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct DropTableStmt<'a> {
pub if_exists: bool,
pub catalog: Option<Identifier<'a>>,
Expand Down Expand Up @@ -226,7 +226,7 @@ impl Display for DropTableStmt<'_> {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct UndropTableStmt<'a> {
pub catalog: Option<Identifier<'a>>,
pub database: Option<Identifier<'a>>,
Expand Down Expand Up @@ -296,7 +296,7 @@ impl Display for AlterTableAction<'_> {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct RenameTableStmt<'a> {
pub if_exists: bool,
pub catalog: Option<Identifier<'a>>,
Expand Down Expand Up @@ -331,7 +331,7 @@ impl Display for RenameTableStmt<'_> {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct TruncateTableStmt<'a> {
pub catalog: Option<Identifier<'a>>,
pub database: Option<Identifier<'a>>,
Expand All @@ -357,7 +357,7 @@ impl Display for TruncateTableStmt<'_> {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct OptimizeTableStmt<'a> {
pub catalog: Option<Identifier<'a>>,
pub database: Option<Identifier<'a>>,
Expand All @@ -383,7 +383,7 @@ impl Display for OptimizeTableStmt<'_> {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ExistsTableStmt<'a> {
pub catalog: Option<Identifier<'a>>,
pub database: Option<Identifier<'a>>,
Expand All @@ -403,7 +403,7 @@ impl Display for ExistsTableStmt<'_> {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Engine {
Null,
Memory,
Expand All @@ -426,7 +426,7 @@ impl Display for Engine {
}
}

#[derive(Debug, Clone, Copy, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum OptimizeTableAction {
All,
Purge,
Expand All @@ -443,7 +443,7 @@ impl Display for OptimizeTableAction {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum TableOption {
Engine(Engine),
Comment(String),
Expand Down
16 changes: 8 additions & 8 deletions common/ast/src/ast/statements/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use common_meta_types::UserPrivilegeType;

use crate::ast::write_comma_separated_list;

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct CreateUserStmt {
pub if_not_exists: bool,
pub user: UserIdentity,
Expand All @@ -51,7 +51,7 @@ impl Display for CreateUserStmt {
}
}

#[derive(Debug, Clone, PartialEq, Default)]
#[derive(Debug, Clone, PartialEq, Eq, Default)]
pub struct AuthOption {
pub auth_type: Option<AuthType>,
pub password: Option<String>,
Expand All @@ -70,7 +70,7 @@ impl Display for AuthOption {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct AlterUserStmt {
// None means current user
pub user: Option<UserIdentity>,
Expand Down Expand Up @@ -101,7 +101,7 @@ impl Display for AlterUserStmt {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct GrantStmt {
pub source: AccountMgrSource,
pub principal: PrincipalIdentity,
Expand All @@ -117,7 +117,7 @@ impl Display for GrantStmt {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct RevokeStmt {
pub source: AccountMgrSource,
pub principal: PrincipalIdentity,
Expand All @@ -133,7 +133,7 @@ impl Display for RevokeStmt {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum AccountMgrSource {
Role {
role: String,
Expand All @@ -147,14 +147,14 @@ pub enum AccountMgrSource {
},
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum AccountMgrLevel {
Global,
Database(Option<String>),
Table(Option<String>, String),
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum RoleOption {
TenantSetting,
NoTenantSetting,
Expand Down
2 changes: 1 addition & 1 deletion common/ast/src/ast/statements/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl Display for AlterViewStmt<'_> {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct DropViewStmt<'a> {
pub if_exists: bool,
pub catalog: Option<Identifier<'a>>,
Expand Down
4 changes: 2 additions & 2 deletions common/ast/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub struct Error<'a> {
}

/// ErrorKind is the error type returned from parser.
#[derive(Clone, Copy, Debug, PartialEq)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ErrorKind {
/// Error generated by `match_token` function
ExpectToken(TokenKind),
Expand Down Expand Up @@ -73,7 +73,7 @@ impl<'a> Backtrace<'a> {
}
}

#[derive(Clone, Debug, PartialEq)]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct BacktraceInner<'a> {
/// The next token when encountering an error.
span: Token<'a>,
Expand Down
2 changes: 1 addition & 1 deletion common/ast/src/parser/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use logos::Span;
pub use self::TokenKind::*;
use crate::DisplayError;

#[derive(Clone, PartialEq)]
#[derive(Clone, PartialEq, Eq)]
pub struct Token<'a> {
pub source: &'a str,
pub kind: TokenKind,
Expand Down
4 changes: 2 additions & 2 deletions common/ast/src/udfs/udf_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl UDFParser {
return Ok(());
}

return Err(ErrorCode::SyntaxException(format!(
Err(ErrorCode::SyntaxException(format!(
"{}{}",
if params_not_declared.is_empty() {
"".to_string()
Expand All @@ -91,7 +91,7 @@ impl UDFParser {
} else {
format!("Parameters are not used: {:?}", params_not_used)
},
)));
)))
}
}

Expand Down
2 changes: 1 addition & 1 deletion common/base/src/mem_allocator/malloc_size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ impl<T> MallocShallowSizeOf for std::collections::VecDeque<T> {
if ops.has_malloc_enclosing_size_of() {
if let Some(front) = self.front() {
// The front element is an interior pointer.
unsafe { ops.malloc_enclosing_size_of(&*front) }
unsafe { ops.malloc_enclosing_size_of(front) }
} else {
// This assumes that no memory is allocated when the VecDeque is empty.
0
Expand Down
Loading