]> git.lizzy.rs Git - rust.git/commitdiff
Document rustc_ast::FnHeader fields
authorManish Goregaokar <manishsmail@gmail.com>
Mon, 2 Jan 2023 22:26:43 +0000 (14:26 -0800)
committerManish Goregaokar <manishsmail@gmail.com>
Mon, 2 Jan 2023 22:42:27 +0000 (14:42 -0800)
compiler/rustc_ast/src/ast.rs

index 9f38deacca416528e915a8f49b8fb13895813738..37dfa46f696eaeb91f8a437b122b405d45b3d452 100644 (file)
@@ -2736,9 +2736,13 @@ pub fn from_abi(abi: Option<StrLit>, span: Span) -> Extern {
 /// included in this struct (e.g., `async unsafe fn` or `const extern "C" fn`).
 #[derive(Clone, Copy, Encodable, Decodable, Debug)]
 pub struct FnHeader {
+    /// The `unsafe` keyword, if any
     pub unsafety: Unsafe,
+    /// The `async` keyword, if any
     pub asyncness: Async,
+    /// The `const` keyword, if any
     pub constness: Const,
+    /// The `extern` keyword and corresponding ABI string, if any
     pub ext: Extern,
 }