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:
Stuart Cook
2025-11-26 23:32:11 +11:00
committed by GitHub
+3 -3
View File
@@ -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,