diff options
Diffstat (limited to 'src/libproc_macro')
| -rw-r--r-- | src/libproc_macro/bridge/client.rs | 6 | ||||
| -rw-r--r-- | src/libproc_macro/bridge/mod.rs | 2 | ||||
| -rw-r--r-- | src/libproc_macro/bridge/scoped_cell.rs | 2 | ||||
| -rw-r--r-- | src/libproc_macro/bridge/server.rs | 2 | ||||
| -rw-r--r-- | src/libproc_macro/lib.rs | 20 |
5 files changed, 16 insertions, 16 deletions
diff --git a/src/libproc_macro/bridge/client.rs b/src/libproc_macro/bridge/client.rs index ed27df44962..f5e12713e4e 100644 --- a/src/libproc_macro/bridge/client.rs +++ b/src/libproc_macro/bridge/client.rs @@ -262,7 +262,7 @@ enum BridgeState<'a> { Connected(Bridge<'a>), /// Access to the bridge is being exclusively acquired - /// (e.g. during `BridgeState::with`). + /// (e.g., during `BridgeState::with`). InUse, } @@ -283,7 +283,7 @@ impl BridgeState<'_> { /// The state will be restored after `f` exits, even /// by panic, including modifications made to it by `f`. /// - /// NB: while `f` is running, the thread-local state + /// N.B., while `f` is running, the thread-local state /// is `BridgeState::InUse`. fn with<R>(f: impl FnOnce(&mut BridgeState) -> R) -> R { BRIDGE_STATE.with(|state| { @@ -333,7 +333,7 @@ impl Bridge<'_> { /// which may be using a different `proc_macro` from the one /// used by the server, but can be interacted with compatibly. /// -/// NB: `F` must have FFI-friendly memory layout (e.g. a pointer). +/// N.B., `F` must have FFI-friendly memory layout (e.g., a pointer). /// The call ABI of function pointers used for `F` doesn't /// need to match between server and client, since it's only /// passed between them and (eventually) called by the client. diff --git a/src/libproc_macro/bridge/mod.rs b/src/libproc_macro/bridge/mod.rs index f03c63fc04c..edb4d3fbdaa 100644 --- a/src/libproc_macro/bridge/mod.rs +++ b/src/libproc_macro/bridge/mod.rs @@ -14,7 +14,7 @@ //! Serialization (with C ABI buffers) and unique integer handles are employed //! to allow safely interfacing between two copies of `proc_macro` built //! (from the same source) by different compilers with potentially mismatching -//! Rust ABIs (e.g. stage0/bin/rustc vs stage1/bin/rustc during bootstrap). +//! Rust ABIs (e.g., stage0/bin/rustc vs stage1/bin/rustc during bootstrap). #![deny(unsafe_code)] diff --git a/src/libproc_macro/bridge/scoped_cell.rs b/src/libproc_macro/bridge/scoped_cell.rs index 51d1fece79b..c86d5fc309a 100644 --- a/src/libproc_macro/bridge/scoped_cell.rs +++ b/src/libproc_macro/bridge/scoped_cell.rs @@ -19,7 +19,7 @@ pub trait ApplyL<'a> { type Out; } -/// Type lambda taking a lifetime, i.e. `Lifetime -> Type`. +/// Type lambda taking a lifetime, i.e., `Lifetime -> Type`. pub trait LambdaL: for<'a> ApplyL<'a> {} impl<T: for<'a> ApplyL<'a>> LambdaL for T {} diff --git a/src/libproc_macro/bridge/server.rs b/src/libproc_macro/bridge/server.rs index f500b17d1ca..0c1d4f7cc50 100644 --- a/src/libproc_macro/bridge/server.rs +++ b/src/libproc_macro/bridge/server.rs @@ -16,7 +16,7 @@ use super::*; use super::client::HandleStore; /// Declare an associated item of one of the traits below, optionally -/// adjusting it (i.e. adding bounds to types and default bodies to methods). +/// adjusting it (i.e., adding bounds to types and default bodies to methods). macro_rules! associated_item { (type TokenStream) => (type TokenStream: 'static + Clone;); diff --git a/src/libproc_macro/lib.rs b/src/libproc_macro/lib.rs index 32c81302931..f2b85832dac 100644 --- a/src/libproc_macro/lib.rs +++ b/src/libproc_macro/lib.rs @@ -110,7 +110,7 @@ impl FromStr for TokenStream { } } -// NB: the bridge only provides `to_string`, implement `fmt::Display` +// N.B., the bridge only provides `to_string`, implement `fmt::Display` // based on it (the reverse of the usual relationship between the two). #[stable(feature = "proc_macro_lib", since = "1.15.0")] impl ToString for TokenStream { @@ -196,7 +196,7 @@ pub mod token_stream { use {bridge, Group, Ident, Literal, Punct, TokenTree, TokenStream}; /// An iterator over `TokenStream`'s `TokenTree`s. - /// The iteration is "shallow", e.g. the iterator doesn't recurse into delimited groups, + /// The iteration is "shallow", e.g., the iterator doesn't recurse into delimited groups, /// and returns whole groups as token trees. #[derive(Clone)] #[stable(feature = "proc_macro_lib2", since = "1.29.0")] @@ -426,7 +426,7 @@ impl PartialEq for SourceFile { #[unstable(feature = "proc_macro_span", issue = "54725")] impl Eq for SourceFile {} -/// A single token or a delimited sequence of token trees (e.g. `[1, (), ..]`). +/// A single token or a delimited sequence of token trees (e.g., `[1, (), ..]`). #[stable(feature = "proc_macro_lib2", since = "1.29.0")] #[derive(Clone)] pub enum TokenTree { @@ -533,7 +533,7 @@ impl From<Literal> for TokenTree { } } -// NB: the bridge only provides `to_string`, implement `fmt::Display` +// N.B., the bridge only provides `to_string`, implement `fmt::Display` // based on it (the reverse of the usual relationship between the two). #[stable(feature = "proc_macro_lib", since = "1.15.0")] impl ToString for TokenTree { @@ -663,7 +663,7 @@ impl Group { } } -// NB: the bridge only provides `to_string`, implement `fmt::Display` +// N.B., the bridge only provides `to_string`, implement `fmt::Display` // based on it (the reverse of the usual relationship between the two). #[stable(feature = "proc_macro_lib", since = "1.15.0")] impl ToString for Group { @@ -711,10 +711,10 @@ impl !Sync for Punct {} #[derive(Copy, Clone, Debug, PartialEq, Eq)] #[stable(feature = "proc_macro_lib2", since = "1.29.0")] pub enum Spacing { - /// E.g. `+` is `Alone` in `+ =`, `+ident` or `+()`. + /// e.g., `+` is `Alone` in `+ =`, `+ident` or `+()`. #[stable(feature = "proc_macro_lib2", since = "1.29.0")] Alone, - /// E.g. `+` is `Joint` in `+=` or `'#`. + /// e.g., `+` is `Joint` in `+=` or `'#`. /// Additionally, single quote `'` can join with identifiers to form lifetimes `'ident`. #[stable(feature = "proc_macro_lib2", since = "1.29.0")] Joint, @@ -765,7 +765,7 @@ impl Punct { } } -// NB: the bridge only provides `to_string`, implement `fmt::Display` +// N.B., the bridge only provides `to_string`, implement `fmt::Display` // based on it (the reverse of the usual relationship between the two). #[stable(feature = "proc_macro_lib", since = "1.15.0")] impl ToString for Punct { @@ -860,7 +860,7 @@ impl Ident { } } -// NB: the bridge only provides `to_string`, implement `fmt::Display` +// N.B., the bridge only provides `to_string`, implement `fmt::Display` // based on it (the reverse of the usual relationship between the two). #[stable(feature = "proc_macro_lib", since = "1.15.0")] impl ToString for Ident { @@ -1110,7 +1110,7 @@ impl Literal { } } -// NB: the bridge only provides `to_string`, implement `fmt::Display` +// N.B., the bridge only provides `to_string`, implement `fmt::Display` // based on it (the reverse of the usual relationship between the two). #[stable(feature = "proc_macro_lib", since = "1.15.0")] impl ToString for Literal { |
