about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-12-30 18:39:57 +0000
committerbors <bors@rust-lang.org>2023-12-30 18:39:57 +0000
commit5a345b325b59370171d9a00c8f575fb177ead767 (patch)
tree7b5b6418b0570e87bfc5afc7536f2a95d7037ace /compiler/rustc_parse/src/parser
parenta2541e861e74cd1fe6454df02c843ad1ec592589 (diff)
parentffafcd8819deb78ad85dd4968cf5da531d8f436d (diff)
downloadrust-5a345b325b59370171d9a00c8f575fb177ead767.tar.gz
rust-5a345b325b59370171d9a00c8f575fb177ead767.zip
Auto merge of #119446 - Nilstrieb:bitflags2.0-hell, r=compiler-errors
Update to bitflags 2 in the compiler

This involves lots of breaking changes. There are two big changes that force changes. The first is that the bitflag types now don't automatically implement normal derive traits, so we need to derive them manually.

Additionally, bitflags now have a hidden inner type by default, which breaks our custom derives. The bitflags docs recommend using the impl form in these cases, which I did.

r? compiler
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/mod.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs
index 19226f37abe..3932d32a6e1 100644
--- a/compiler/rustc_parse/src/parser/mod.rs
+++ b/compiler/rustc_parse/src/parser/mod.rs
@@ -46,6 +46,7 @@ use crate::errors::{
 };
 
 bitflags::bitflags! {
+    #[derive(Clone, Copy)]
     struct Restrictions: u8 {
         const STMT_EXPR         = 1 << 0;
         const NO_STRUCT_LITERAL = 1 << 1;