Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix new doc warnings in 1.73.0 #6055

Merged
merged 1 commit into from Oct 6, 2023
Merged

Conversation

Darksonn
Copy link
Contributor

@Darksonn Darksonn commented Oct 6, 2023

This fixes new documentation warnings in 1.73.0.

warning: unused doc comment
  --> tokio/src/runtime/context.rs:83:13
   |
83 |             /// Tracks the current runtime handle to use when spawning,
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
86 |             current: current::HandleCell::new(),
   |             ----------------------------------- rustdoc does not generate documentation for expression fields
   |
   = help: use `//` for a plain comment
   = note: `#[warn(unused_doc_comments)]` on by default

warning: unused doc comment
  --> tokio/src/runtime/context.rs:84:13
   |
84 |             /// accessing drivers, etc...
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
85 |             #[cfg(feature = "rt")]
86 |             current: current::HandleCell::new(),
   |             ----------------------------------- rustdoc does not generate documentation for expression fields
   |
   = help: use `//` for a plain comment

warning: unused doc comment
  --> tokio/src/runtime/context.rs:88:13
   |
88 |             /// Tracks the current scheduler internal context
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
89 |             #[cfg(feature = "rt")]
90 |             scheduler: Scoped::new(),
   |             ------------------------ rustdoc does not generate documentation for expression fields
   |
   = help: use `//` for a plain comment

warning: unused doc comment
   --> tokio/src/runtime/context.rs:95:13
    |
95  |             /// Tracks if the current thread is currently driving a runtime.
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
101 |             runtime: Cell::new(EnterRuntime::NotEntered),
    |             -------------------------------------------- rustdoc does not generate documentation for expression fields
    |
    = help: use `//` for a plain comment

warning: unused doc comment
   --> tokio/src/runtime/context.rs:96:13
    |
96  |             /// Note, that if this is set to "entered", the current scheduler
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
101 |             runtime: Cell::new(EnterRuntime::NotEntered),
    |             -------------------------------------------- rustdoc does not generate documentation for expression fields
    |
    = help: use `//` for a plain comment

warning: unused doc comment
   --> tokio/src/runtime/context.rs:97:13
    |
97  |             /// handle may not reference the runtime currently executing. This
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
101 |             runtime: Cell::new(EnterRuntime::NotEntered),
    |             -------------------------------------------- rustdoc does not generate documentation for expression fields
    |
    = help: use `//` for a plain comment

warning: unused doc comment
   --> tokio/src/runtime/context.rs:98:13
    |
98  |             /// is because other runtime handles may be set to current from
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
101 |             runtime: Cell::new(EnterRuntime::NotEntered),
    |             -------------------------------------------- rustdoc does not generate documentation for expression fields
    |
    = help: use `//` for a plain comment

warning: unused doc comment
   --> tokio/src/runtime/context.rs:99:13
    |
99  |             /// within a runtime.
    |             ^^^^^^^^^^^^^^^^^^^^^
100 |             #[cfg(feature = "rt")]
101 |             runtime: Cell::new(EnterRuntime::NotEntered),
    |             -------------------------------------------- rustdoc does not generate documentation for expression fields
    |
    = help: use `//` for a plain comment

warning: redundant explicit link target
  --> tokio/src/net/unix/pipe.rs:25:61
   |
25 | /// are trying to open. This will give you a [`io::Result`][result] with a pipe
   |                                               ------------  ^^^^^^ explicit target is redundant
   |                                               |
   |                                               because label contains path that resolves to same destination
   |
note: referenced explicit link target defined here
  --> tokio/src/net/unix/pipe.rs:31:15
   |
31 | /// [result]: std::io::Result
   |               ^^^^^^^^^^^^^^^
   = note: when a link's destination is not specified,
           the label is used to resolve intra-doc links
   = note: `#[warn(rustdoc::redundant_explicit_links)]` on by default
help: remove explicit link target
   |
25 | /// are trying to open. This will give you a [`io::Result`] with a pipe
   |                                              ~~~~~~~~~~~~~~

warning: redundant explicit link target
   --> tokio/src/sync/mod.rs:178:18
    |
178 | //! The [`mpsc`][mpsc] and [`oneshot`][oneshot] channels can be combined to
    |          ------  ^^^^ explicit target is redundant
    |          |
    |          because label contains path that resolves to same destination
    |
note: referenced explicit link target defined here
   --> tokio/src/sync/mod.rs:239:13
    |
239 | //! [mpsc]: mpsc
    |             ^^^^
    = note: when a link's destination is not specified,
            the label is used to resolve intra-doc links
help: remove explicit link target
    |
178 | //! The [`mpsc`] and [`oneshot`][oneshot] channels can be combined to
    |         ~~~~~~~~

warning: redundant explicit link target
   --> tokio/src/sync/mod.rs:178:40
    |
178 | //! The [`mpsc`][mpsc] and [`oneshot`][oneshot] channels can be combined to
    |                             ---------  ^^^^^^^ explicit target is redundant
    |                             |
    |                             because label contains path that resolves to same destination
    |
note: referenced explicit link target defined here
   --> tokio/src/sync/mod.rs:88:16
    |
88  | //! [oneshot]: oneshot
    |                ^^^^^^^
    = note: when a link's destination is not specified,
            the label is used to resolve intra-doc links
help: remove explicit link target
    |
178 | //! The [`mpsc`][mpsc] and [`oneshot`] channels can be combined to
    |                            ~~~~~~~~~~~

warning: redundant explicit link target
   --> tokio/src/sync/mod.rs:181:28
    |
181 | //! received on a [`mpsc`][mpsc] channel. Each command includes a
    |                    ------  ^^^^ explicit target is redundant
    |                    |
    |                    because label contains path that resolves to same destination
    |
note: referenced explicit link target defined here
   --> tokio/src/sync/mod.rs:239:13
    |
239 | //! [mpsc]: mpsc
    |             ^^^^
    = note: when a link's destination is not specified,
            the label is used to resolve intra-doc links
help: remove explicit link target
    |
181 | //! received on a [`mpsc`] channel. Each command includes a
    |                   ~~~~~~~~

warning: redundant explicit link target
   --> tokio/src/sync/mod.rs:182:17
    |
182 | //! [`oneshot`][oneshot] `Sender` on which the result of the command is sent.
    |      ---------  ^^^^^^^ explicit target is redundant
    |      |
    |      because label contains path that resolves to same destination
    |
note: referenced explicit link target defined here
   --> tokio/src/sync/mod.rs:88:16
    |
88  | //! [oneshot]: oneshot
    |                ^^^^^^^
    = note: when a link's destination is not specified,
            the label is used to resolve intra-doc links
help: remove explicit link target
    |
182 | //! [`oneshot`] `Sender` on which the result of the command is sent.
    |     ~~~~~~~~~~~

warning: redundant explicit link target
   --> tokio/src/sync/mod.rs:419:19
    |
419 | //! * [`Barrier`](Barrier) Ensures multiple tasks will wait for each other to
    |        ---------  ^^^^^^^ explicit target is redundant
    |        |
    |        because label contains path that resolves to same destination
    |
    = note: when a link's destination is not specified,
            the label is used to resolve intra-doc links
help: remove explicit link target
    |
419 | //! * [`Barrier`] Ensures multiple tasks will wait for each other to
    |       ~~~~~~~~~~~

warning: redundant explicit link target
   --> tokio/src/sync/mod.rs:422:17
    |
422 | //! * [`Mutex`](Mutex) Mutual Exclusion mechanism, which ensures that at most
    |        -------  ^^^^^ explicit target is redundant
    |        |
    |        because label contains path that resolves to same destination
    |
    = note: when a link's destination is not specified,
            the label is used to resolve intra-doc links
help: remove explicit link target
    |
422 | //! * [`Mutex`] Mutual Exclusion mechanism, which ensures that at most
    |       ~~~~~~~~~

warning: redundant explicit link target
   --> tokio/src/sync/mod.rs:425:18
    |
425 | //! * [`Notify`](Notify) Basic task notification. `Notify` supports notifying a
    |        --------  ^^^^^^ explicit target is redundant
    |        |
    |        because label contains path that resolves to same destination
    |
    = note: when a link's destination is not specified,
            the label is used to resolve intra-doc links
help: remove explicit link target
    |
425 | //! * [`Notify`] Basic task notification. `Notify` supports notifying a
    |       ~~~~~~~~~~

warning: redundant explicit link target
   --> tokio/src/sync/mod.rs:429:18
    |
429 | //! * [`RwLock`](RwLock) Provides a mutual exclusion mechanism which allows
    |        --------  ^^^^^^ explicit target is redundant
    |        |
    |        because label contains path that resolves to same destination
    |
    = note: when a link's destination is not specified,
            the label is used to resolve intra-doc links
help: remove explicit link target
    |
429 | //! * [`RwLock`] Provides a mutual exclusion mechanism which allows
    |       ~~~~~~~~~~

warning: redundant explicit link target
   --> tokio/src/sync/mod.rs:433:21
    |
433 | //! * [`Semaphore`](Semaphore) Limits the amount of concurrency. A semaphore
    |        -----------  ^^^^^^^^^ explicit target is redundant
    |        |
    |        because label contains path that resolves to same destination
    |
    = note: when a link's destination is not specified,
            the label is used to resolve intra-doc links
help: remove explicit link target
    |
433 | //! * [`Semaphore`] Limits the amount of concurrency. A semaphore
    |       ~~~~~~~~~~~~~

@Darksonn Darksonn added T-docs Topic: documentation A-tokio Area: The main tokio crate labels Oct 6, 2023
@Darksonn Darksonn requested a review from taiki-e October 6, 2023 09:32
@github-actions github-actions bot added the R-loom-sync Run loom sync tests on this PR label Oct 6, 2023
@Darksonn Darksonn enabled auto-merge (squash) October 6, 2023 09:40
@Darksonn Darksonn merged commit 6b010ac into master Oct 6, 2023
70 checks passed
@Darksonn Darksonn deleted the alice/fix-doc-warnings branch October 6, 2023 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate R-loom-sync Run loom sync tests on this PR T-docs Topic: documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants