From c87bebd553041679ebac00ee572b9f6cce5b9260 Mon Sep 17 00:00:00 2001 From: Jason Newcomb Date: Tue, 25 Nov 2025 23:07:27 -0500 Subject: [PATCH] Add `Copy` to some AST enums. --- compiler/rustc_ast/src/ast.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index f2061f3088a25..900af43dc0785 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -857,7 +857,7 @@ impl BindingMode { } } -#[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,