@@ -52,10 +52,10 @@ use tracing_core::{
5252/// use tracing_subscriber::prelude::*;
5353///
5454/// let fmt = format().with_timer(time::Uptime::default());
55- /// let fmt_layer = fmt::subscriber()
55+ /// let fmt_subscriber = fmt::subscriber()
5656/// .event_format(fmt)
5757/// .with_target(false);
58- /// # let subscriber = fmt_layer .with_collector(tracing_subscriber::registry::Registry::default());
58+ /// # let subscriber = fmt_subscriber .with_collector(tracing_subscriber::registry::Registry::default());
5959/// # tracing::collect::set_global_default(subscriber).unwrap();
6060/// ```
6161///
@@ -76,14 +76,14 @@ impl<S> Subscriber<S> {
7676 }
7777}
7878
79- // This needs to be a seperate impl block because they place different bounds on the type parameters.
79+ // This needs to be a separate impl block because they place different bounds on the type parameters.
8080impl < S , N , E , W > Subscriber < S , N , E , W >
8181where
8282 S : Collect + for < ' a > LookupSpan < ' a > ,
8383 N : for < ' writer > FormatFields < ' writer > + ' static ,
8484 W : for < ' writer > MakeWriter < ' writer > + ' static ,
8585{
86- /// Sets the [event formatter][`FormatEvent`] that the layer will use to
86+ /// Sets the [event formatter][`FormatEvent`] that the subscriber will use to
8787 /// format events.
8888 ///
8989 /// The event formatter may be any type implementing the [`FormatEvent`]
@@ -96,11 +96,11 @@ where
9696 /// ```rust
9797 /// use tracing_subscriber::fmt::{self, format};
9898 ///
99- /// let layer = fmt::subscriber()
99+ /// let fmt_subscriber = fmt::subscriber()
100100 /// .event_format(format().compact());
101101 /// # // this is necessary for type inference.
102102 /// # use tracing_subscriber::Subscribe as _;
103- /// # let _ = layer .with_collector(tracing_subscriber::registry::Registry::default());
103+ /// # let _ = fmt_subscriber .with_collector(tracing_subscriber::registry::Registry::default());
104104 /// ```
105105 /// [`FormatEvent`]: format::FormatEvent
106106 /// [`Event`]: tracing::Event
@@ -118,7 +118,7 @@ where
118118 }
119119}
120120
121- // This needs to be a seperate impl block because they place different bounds on the type parameters.
121+ // This needs to be a separate impl block because they place different bounds on the type parameters.
122122impl < S , N , E , W > Subscriber < S , N , E , W > {
123123 /// Sets the [`MakeWriter`] that the [`Subscriber`] being built will use to write events.
124124 ///
@@ -130,11 +130,11 @@ impl<S, N, E, W> Subscriber<S, N, E, W> {
130130 /// use std::io;
131131 /// use tracing_subscriber::fmt;
132132 ///
133- /// let layer = fmt::subscriber()
133+ /// let fmt_subscriber = fmt::subscriber()
134134 /// .with_writer(io::stderr);
135135 /// # // this is necessary for type inference.
136136 /// # use tracing_subscriber::Subscribe as _;
137- /// # let _ = layer .with_collector(tracing_subscriber::registry::Registry::default());
137+ /// # let _ = fmt_subscriber .with_collector(tracing_subscriber::registry::Registry::default());
138138 /// ```
139139 ///
140140 /// [`MakeWriter`]: super::writer::MakeWriter
@@ -165,11 +165,11 @@ impl<S, N, E, W> Subscriber<S, N, E, W> {
165165 /// use std::io;
166166 /// use tracing_subscriber::fmt;
167167 ///
168- /// let layer = fmt::subscriber()
168+ /// let fmt_subscriber = fmt::subscriber()
169169 /// .with_test_writer();
170170 /// # // this is necessary for type inference.
171171 /// # use tracing_subscriber::Subscribe as _;
172- /// # let _ = layer .with_collector(tracing_subscriber::registry::Registry::default());
172+ /// # let _ = fmt_subscriber .with_collector(tracing_subscriber::registry::Registry::default());
173173 /// ```
174174 /// [capturing]:
175175 /// https://doc.rust-lang.org/book/ch11-02-running-tests.html#showing-function-output
@@ -384,7 +384,7 @@ where
384384#[ cfg( feature = "json" ) ]
385385#[ cfg_attr( docsrs, doc( cfg( feature = "json" ) ) ) ]
386386impl < S , T , W > Subscriber < S , format:: JsonFields , format:: Format < format:: Json , T > , W > {
387- /// Sets the JSON layer being built to flatten event metadata.
387+ /// Sets the JSON subscriber being built to flatten event metadata.
388388 ///
389389 /// See [`format::Json`]
390390 pub fn flatten_event (
@@ -436,7 +436,7 @@ impl<S, T, W> Subscriber<S, format::JsonFields, format::Format<format::Json, T>,
436436}
437437
438438impl < S , N , E , W > Subscriber < S , N , E , W > {
439- /// Sets the field formatter that the layer being built will use to record
439+ /// Sets the field formatter that the subscriber being built will use to record
440440 /// fields.
441441 pub fn fmt_fields < N2 > ( self , fmt_fields : N2 ) -> Subscriber < S , N2 , E , W >
442442 where
@@ -527,7 +527,7 @@ impl<E> Deref for FormattedFields<E> {
527527 }
528528}
529529
530- // === impl FmtLayer ===
530+ // === impl FmtSubscriber ===
531531
532532macro_rules! with_event_from_span {
533533 ( $id: ident, $span: ident, $( $field: literal = $value: expr) ,* , |$event: ident| $code: block) => {
@@ -710,9 +710,9 @@ where
710710 }
711711
712712 unsafe fn downcast_raw ( & self , id : TypeId ) -> Option < NonNull < ( ) > > {
713- // This `downcast_raw` impl allows downcasting a `fmt` layer to any of
713+ // This `downcast_raw` impl allows downcasting a `fmt` subscriber to any of
714714 // its components (event formatter, field formatter, and `MakeWriter`)
715- // as well as to the layer 's type itself. The potential use-cases for
715+ // as well as to the subscriber 's type itself. The potential use-cases for
716716 // this *may* be somewhat niche, though...
717717 match ( ) {
718718 _ if id == TypeId :: of :: < Self > ( ) => Some ( NonNull :: from ( self ) . cast ( ) ) ,
@@ -894,7 +894,7 @@ mod test {
894894 }
895895
896896 #[ test]
897- fn fmt_layer_downcasts ( ) {
897+ fn fmt_subscriber_downcasts ( ) {
898898 let f = format:: Format :: default ( ) ;
899899 let fmt = fmt:: Subscriber :: default ( ) . event_format ( f) ;
900900 let subscriber = fmt. with_collector ( Registry :: default ( ) ) ;
@@ -906,7 +906,7 @@ mod test {
906906 }
907907
908908 #[ test]
909- fn fmt_layer_downcasts_to_parts ( ) {
909+ fn fmt_subscriber_downcasts_to_parts ( ) {
910910 let f = format:: Format :: default ( ) ;
911911 let fmt = fmt:: Subscriber :: default ( ) . event_format ( f) ;
912912 let subscriber = fmt. with_collector ( Registry :: default ( ) ) ;
0 commit comments