diff options
| author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-12-30 17:09:02 +0100 |
|---|---|---|
| committer | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-12-30 18:17:28 +0100 |
| commit | ffafcd8819deb78ad85dd4968cf5da531d8f436d (patch) | |
| tree | dbe135ccc229744b529370fdc66aa5003d60292b /compiler/rustc_parse/src/parser | |
| parent | d59f06fc64844ec2073e5e888f7470989ef25ff9 (diff) | |
| download | rust-ffafcd8819deb78ad85dd4968cf5da531d8f436d.tar.gz rust-ffafcd8819deb78ad85dd4968cf5da531d8f436d.zip | |
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.
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 1 |
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; |
