mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
Rollup merge of #149341 - Jarcho:ast_copy, r=chenyukang
Add `Copy` to some AST enums. It's a minor annoyance they aren't `Copy` and there doesn't seem to be any reason for them not to be.
This commit is contained in:
@@ -857,7 +857,7 @@ pub fn prefix_str(self) -> &'static str {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Encodable, Decodable, Debug, Walkable)]
|
||||
#[derive(Clone, Copy, Encodable, Decodable, Debug, Walkable)]
|
||||
pub enum RangeEnd {
|
||||
/// `..=` or `...`
|
||||
Included(RangeSyntax),
|
||||
@@ -865,7 +865,7 @@ pub enum RangeEnd {
|
||||
Excluded,
|
||||
}
|
||||
|
||||
#[derive(Clone, Encodable, Decodable, Debug, Walkable)]
|
||||
#[derive(Clone, Copy, Encodable, Decodable, Debug, Walkable)]
|
||||
pub enum RangeSyntax {
|
||||
/// `...`
|
||||
DotDotDot,
|
||||
@@ -1915,7 +1915,7 @@ pub enum ForLoopKind {
|
||||
}
|
||||
|
||||
/// Used to differentiate between `async {}` blocks and `gen {}` blocks.
|
||||
#[derive(Clone, Encodable, Decodable, Debug, PartialEq, Eq, Walkable)]
|
||||
#[derive(Clone, Copy, Encodable, Decodable, Debug, PartialEq, Eq, Walkable)]
|
||||
pub enum GenBlockKind {
|
||||
Async,
|
||||
Gen,
|
||||
|
||||
Reference in New Issue
Block a user