about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilfred Hughes <me@wilfred.me.uk>2024-03-29 10:10:52 -0700
committerGitHub <noreply@github.com>2024-03-29 10:10:52 -0700
commit7804edebfec17dec75bd6d2bb67e641434fbaa27 (patch)
tree72e4efebffd7babb323897e2338aa8fb5cc3de9b
parent685927aae69657b46323cffbeb0062835bd7fa2b (diff)
downloadrust-7804edebfec17dec75bd6d2bb67e641434fbaa27.tar.gz
rust-7804edebfec17dec75bd6d2bb67e641434fbaa27.zip
Improve wording in std::any explanation
Prefer 'log' over 'log out' to avoid confusion, and use backticks consistently.
-rw-r--r--library/core/src/any.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/core/src/any.rs b/library/core/src/any.rs
index a4252d0c9e0..37cb8e7d303 100644
--- a/library/core/src/any.rs
+++ b/library/core/src/any.rs
@@ -40,10 +40,10 @@
 //!
 //! ## Examples
 //!
-//! Consider a situation where we want to log out a value passed to a function.
-//! We know the value we're working on implements Debug, but we don't know its
+//! Consider a situation where we want to log a value passed to a function.
+//! We know the value we're working on implements `Debug`, but we don't know its
 //! concrete type. We want to give special treatment to certain types: in this
-//! case printing out the length of String values prior to their value.
+//! case printing out the length of `String` values prior to their value.
 //! We don't know the concrete type of our value at compile time, so we need to
 //! use runtime reflection instead.
 //!
@@ -51,7 +51,7 @@
 //! use std::fmt::Debug;
 //! use std::any::Any;
 //!
-//! // Logger function for any type that implements Debug.
+//! // Logger function for any type that implements `Debug`.
 //! fn log<T: Any + Debug>(value: &T) {
 //!     let value_any = value as &dyn Any;
 //!