diff options
| author | Eric Holk <ericholk@microsoft.com> | 2024-09-20 12:09:18 -0700 |
|---|---|---|
| committer | Eric Holk <ericholk@microsoft.com> | 2024-10-07 11:15:04 -0700 |
| commit | ae698f819935aae8623f41aa3837cc0a07903c1a (patch) | |
| tree | c13cb2f6aa92365689a10cbc4cbe8a297a5ba382 /compiler/rustc_ast_ir | |
| parent | 7caad6925314911eefe54b040d4bc5be940e8f92 (diff) | |
| download | rust-ae698f819935aae8623f41aa3837cc0a07903c1a.tar.gz rust-ae698f819935aae8623f41aa3837cc0a07903c1a.zip | |
Add sugar for &pin (const|mut) types
Diffstat (limited to 'compiler/rustc_ast_ir')
| -rw-r--r-- | compiler/rustc_ast_ir/src/lib.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_ast_ir/src/lib.rs b/compiler/rustc_ast_ir/src/lib.rs index eeed5d36151..ff9d940ce9f 100644 --- a/compiler/rustc_ast_ir/src/lib.rs +++ b/compiler/rustc_ast_ir/src/lib.rs @@ -79,3 +79,10 @@ impl Mutability { matches!(self, Self::Not) } } + +#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Copy)] +#[cfg_attr(feature = "nightly", derive(Encodable, Decodable, HashStable_NoContext))] +pub enum Pinnedness { + Not, + Pinned, +} |
