about summary refs log tree commit diff
path: root/library/proc_macro
diff options
context:
space:
mode:
authorJohn Arundel <john@bitfieldconsulting.com>2024-07-15 12:26:30 +0100
committerJohn Arundel <john@bitfieldconsulting.com>2024-07-26 13:26:33 +0100
commita19472a93e2eecce1477011fa9f7ec49b45ca164 (patch)
tree3b7cee954a0c37ee98fbedd430fbf46a2ea12559 /library/proc_macro
parent83d67685acb520fe68d5d5adde4b25fb725490de (diff)
downloadrust-a19472a93e2eecce1477011fa9f7ec49b45ca164.tar.gz
rust-a19472a93e2eecce1477011fa9f7ec49b45ca164.zip
Fix doc nits
Many tiny changes to stdlib doc comments to make them consistent (for example
"Returns foo", rather than "Return foo", per RFC1574), adding missing periods, paragraph
breaks, backticks for monospace style, and other minor nits.

https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#appendix-a-full-conventions-text
Diffstat (limited to 'library/proc_macro')
-rw-r--r--library/proc_macro/src/bridge/server.rs2
-rw-r--r--library/proc_macro/src/bridge/symbol.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/library/proc_macro/src/bridge/server.rs b/library/proc_macro/src/bridge/server.rs
index 0dbd4bac85c..140519bcb23 100644
--- a/library/proc_macro/src/bridge/server.rs
+++ b/library/proc_macro/src/bridge/server.rs
@@ -350,7 +350,7 @@ where
 
 /// A message pipe used for communicating between server and client threads.
 pub trait MessagePipe<T>: Sized {
-    /// Create a new pair of endpoints for the message pipe.
+    /// Creates a new pair of endpoints for the message pipe.
     fn new() -> (Self, Self);
 
     /// Send a message to the other endpoint of this pipe.
diff --git a/library/proc_macro/src/bridge/symbol.rs b/library/proc_macro/src/bridge/symbol.rs
index 86ce2cc1895..37aaee6b215 100644
--- a/library/proc_macro/src/bridge/symbol.rs
+++ b/library/proc_macro/src/bridge/symbol.rs
@@ -28,7 +28,7 @@ impl Symbol {
         INTERNER.with_borrow_mut(|i| i.intern(string))
     }
 
-    /// Create a new `Symbol` for an identifier.
+    /// Creates a new `Symbol` for an identifier.
     ///
     /// Validates and normalizes before converting it to a symbol.
     pub(crate) fn new_ident(string: &str, is_raw: bool) -> Self {
@@ -63,7 +63,7 @@ impl Symbol {
         INTERNER.with_borrow_mut(|i| i.clear());
     }
 
-    /// Check if the ident is a valid ASCII identifier.
+    /// Checks if the ident is a valid ASCII identifier.
     ///
     /// This is a short-circuit which is cheap to implement within the
     /// proc-macro client to avoid RPC when creating simple idents, but may
@@ -177,7 +177,7 @@ impl Interner {
         name
     }
 
-    /// Read a symbol's value from the store while it is held.
+    /// Reads a symbol's value from the store while it is held.
     fn get(&self, symbol: Symbol) -> &str {
         // NOTE: Subtract out the offset which was added to make the symbol
         // nonzero and prevent symbol name re-use.