about summary refs log tree commit diff
path: root/compiler/rustc_ast/src/ast.rs
diff options
context:
space:
mode:
authorFrank King <frankking1729@gmail.com>2025-01-19 22:01:11 +0800
committerFrank King <frankking1729@gmail.com>2025-06-15 10:21:29 +0800
commite627f88f88de85cc52ff1c99a076909084806c98 (patch)
tree0f53bd1e6bef6c79ada367f0a6ca8c7ac6eb2f93 /compiler/rustc_ast/src/ast.rs
parent49a8ba06848fa8f282fe9055b4178350970bb0ce (diff)
downloadrust-e627f88f88de85cc52ff1c99a076909084806c98.tar.gz
rust-e627f88f88de85cc52ff1c99a076909084806c98.zip
Implement pinned borrows, part of `pin_ergonomics`
Diffstat (limited to 'compiler/rustc_ast/src/ast.rs')
-rw-r--r--compiler/rustc_ast/src/ast.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs
index 6b51cbd7fbe..40f0ac6dea3 100644
--- a/compiler/rustc_ast/src/ast.rs
+++ b/compiler/rustc_ast/src/ast.rs
@@ -898,6 +898,10 @@ pub enum BorrowKind {
     /// The resulting type is either `*const T` or `*mut T`
     /// where `T = typeof($expr)`.
     Raw,
+    /// A pinned borrow, `&pin const $expr` or `&pin mut $expr`.
+    /// The resulting type is either `Pin<&'a T>` or `Pin<&'a mut T>`
+    /// where `T = typeof($expr)` and `'a` is some lifetime.
+    Pin,
 }
 
 #[derive(Clone, Copy, Debug, PartialEq, Encodable, Decodable, HashStable_Generic)]