Skip to content

Commit 23d398b

Browse files
committed
tree-wide: Fix all the rustdoc warnings
1 parent c78cc7a commit 23d398b

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

clippy_lints/src/needless_continue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ fn check_and_warn<'a>(cx: &EarlyContext<'_>, expr: &'a ast::Expr) {
422422
///
423423
/// is transformed to
424424
///
425-
/// ```ignore
425+
/// ```text
426426
/// {
427427
/// let x = 5;
428428
/// ```

clippy_lints/src/needless_for_each.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl LateLintPass<'_> for NeedlessForEach {
122122
/// 2. Detect use of `return` in `Loop` in the closure body.
123123
///
124124
/// NOTE: The functionality of this type is similar to
125-
/// [`crate::utilts::visitors::find_all_ret_expressions`], but we can't use
125+
/// [`clippy_utils::visitors::find_all_ret_expressions`], but we can't use
126126
/// `find_all_ret_expressions` instead of this type. The reasons are:
127127
/// 1. `find_all_ret_expressions` passes the argument of `ExprKind::Ret` to a callback, but what we
128128
/// need here is `ExprKind::Ret` itself.

clippy_utils/src/diagnostics.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pub fn span_lint<T: LintContext>(cx: &T, lint: &'static Lint, sp: impl Into<Mult
6565
///
6666
/// # Example
6767
///
68-
/// ```ignore
68+
/// ```text
6969
/// error: constant division of 0.0 with 0.0 will always result in NaN
7070
/// --> $DIR/zero_div_zero.rs:6:25
7171
/// |
@@ -103,7 +103,7 @@ pub fn span_lint_and_help<'a, T: LintContext>(
103103
///
104104
/// # Example
105105
///
106-
/// ```ignore
106+
/// ```text
107107
/// error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
108108
/// --> $DIR/drop_forget_ref.rs:10:5
109109
/// |
@@ -189,7 +189,7 @@ pub fn span_lint_hir_and_then(
189189
///
190190
/// # Example
191191
///
192-
/// ```ignore
192+
/// ```text
193193
/// error: This `.fold` can be more succinctly expressed as `.any`
194194
/// --> $DIR/methods.rs:390:13
195195
/// |

clippy_utils/src/higher.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ pub fn vec_macro<'e>(cx: &LateContext<'_>, expr: &'e hir::Expr<'_>) -> Option<Ve
195195
/// - `assert!`, `assert_eq!` and `assert_ne!`
196196
/// - `debug_assert!`, `debug_assert_eq!` and `debug_assert_ne!`
197197
/// For example:
198-
/// `assert!(expr)` will return Some([expr])
199-
/// `debug_assert_eq!(a, b)` will return Some([a, b])
198+
/// `assert!(expr)` will return `Some([expr])`
199+
/// `debug_assert_eq!(a, b)` will return `Some([a, b])`
200200
pub fn extract_assert_macro_args<'tcx>(e: &'tcx Expr<'tcx>) -> Option<Vec<&'tcx Expr<'tcx>>> {
201201
/// Try to match the AST for a pattern that contains a match, for example when two args are
202202
/// compared
@@ -283,7 +283,7 @@ pub struct FormatArgsExpn<'tcx> {
283283

284284
/// String literal expressions which represent the format string split by "{}"
285285
pub format_string_parts: &'tcx [Expr<'tcx>],
286-
/// Symbols corresponding to [`format_string_parts`]
286+
/// Symbols corresponding to [`Self::format_string_parts`]
287287
pub format_string_symbols: Vec<Symbol>,
288288
/// Expressions like `ArgumentV1::new(arg0, Debug::fmt)`
289289
pub args: &'tcx [Expr<'tcx>],

clippy_utils/src/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub fn has_iter_method(cx: &LateContext<'_>, probably_ref_ty: Ty<'_>) -> Option<
114114

115115
/// Checks whether a type implements a trait.
116116
/// The function returns false in case the type contains an inference variable.
117-
/// See also [`get_trait_def_id`].
117+
/// See also [`get_trait_def_id`](super::get_trait_def_id).
118118
pub fn implements_trait<'tcx>(
119119
cx: &LateContext<'tcx>,
120120
ty: Ty<'tcx>,

0 commit comments

Comments
 (0)