Remove redundant doc comments

This commit is contained in:
Alex Macleod 2024-08-17 18:17:53 +00:00
parent ed46141081
commit 9aa656df9f
26 changed files with 0 additions and 108 deletions

View file

@ -1,5 +1,3 @@
//! checks for attributes
mod allow_attributes; mod allow_attributes;
mod allow_attributes_without_reason; mod allow_attributes_without_reason;
mod blanket_clippy_restriction_lints; mod blanket_clippy_restriction_lints;

View file

@ -1,5 +1,3 @@
//! lint on missing cargo common metadata
use cargo_metadata::Metadata; use cargo_metadata::Metadata;
use clippy_utils::diagnostics::span_lint; use clippy_utils::diagnostics::span_lint;
use rustc_lint::LateContext; use rustc_lint::LateContext;

View file

@ -1,5 +1,3 @@
//! lint on multiple versions of a crate being used
use cargo_metadata::{DependencyKind, Metadata, Node, Package, PackageId}; use cargo_metadata::{DependencyKind, Metadata, Node, Package, PackageId};
use clippy_utils::diagnostics::span_lint; use clippy_utils::diagnostics::span_lint;
use itertools::Itertools; use itertools::Itertools;

View file

@ -1,5 +1,3 @@
//! lint on manually implemented checked conversions that could be transformed into `try_from`
use clippy_config::msrvs::{self, Msrv}; use clippy_config::msrvs::{self, Msrv};
use clippy_config::Conf; use clippy_config::Conf;
use clippy_utils::diagnostics::span_lint_and_sugg; use clippy_utils::diagnostics::span_lint_and_sugg;

View file

@ -1,5 +1,3 @@
//! calculate cognitive complexity and warn about overly complex functions
use clippy_config::Conf; use clippy_config::Conf;
use clippy_utils::diagnostics::span_lint_and_help; use clippy_utils::diagnostics::span_lint_and_help;
use clippy_utils::source::{IntoSpan, SpanRangeExt}; use clippy_utils::source::{IntoSpan, SpanRangeExt};

View file

@ -1,17 +1,3 @@
//! Checks for if expressions that contain only an if expression.
//!
//! For example, the lint would catch:
//!
//! ```rust,ignore
//! if x {
//! if y {
//! println!("Hello world");
//! }
//! }
//! ```
//!
//! This lint is **warn** by default
use clippy_utils::diagnostics::{span_lint_and_sugg, span_lint_and_then}; use clippy_utils::diagnostics::{span_lint_and_sugg, span_lint_and_then};
use clippy_utils::source::{snippet, snippet_block, snippet_block_with_applicability}; use clippy_utils::source::{snippet, snippet_block, snippet_block_with_applicability};
use clippy_utils::sugg::Sugg; use clippy_utils::sugg::Sugg;

View file

@ -1,5 +1,3 @@
//! Lint on if expressions with an else if, but without a final else branch.
use clippy_utils::diagnostics::span_lint_and_then; use clippy_utils::diagnostics::span_lint_and_then;
use rustc_ast::ast::{Expr, ExprKind}; use rustc_ast::ast::{Expr, ExprKind};
use rustc_lint::{EarlyContext, EarlyLintPass, LintContext}; use rustc_lint::{EarlyContext, EarlyLintPass, LintContext};

View file

@ -1,5 +1,3 @@
//! lint when there is an enum with no variants
use clippy_utils::diagnostics::span_lint_and_help; use clippy_utils::diagnostics::span_lint_and_help;
use rustc_hir::{Item, ItemKind}; use rustc_hir::{Item, ItemKind};
use rustc_lint::{LateContext, LateLintPass}; use rustc_lint::{LateContext, LateLintPass};

View file

@ -1,6 +1,3 @@
//! lint on C-like enums that are `repr(isize/usize)` and have values that
//! don't fit into an `i32`
use clippy_utils::consts::{mir_to_const, Constant}; use clippy_utils::consts::{mir_to_const, Constant};
use clippy_utils::diagnostics::span_lint; use clippy_utils::diagnostics::span_lint;
use rustc_hir::{Item, ItemKind}; use rustc_hir::{Item, ItemKind};

View file

@ -1,6 +1,3 @@
//! lint on if branches that could be swapped so no `!` operation is necessary
//! on the condition
use clippy_utils::consts::{ConstEvalCtxt, Constant}; use clippy_utils::consts::{ConstEvalCtxt, Constant};
use clippy_utils::diagnostics::span_lint_and_help; use clippy_utils::diagnostics::span_lint_and_help;
use clippy_utils::is_else_clause; use clippy_utils::is_else_clause;

View file

@ -1,5 +1,3 @@
//! lint on indexing and slicing operations
use clippy_config::Conf; use clippy_config::Conf;
use clippy_utils::consts::{ConstEvalCtxt, Constant}; use clippy_utils::consts::{ConstEvalCtxt, Constant};
use clippy_utils::diagnostics::{span_lint, span_lint_and_then}; use clippy_utils::diagnostics::{span_lint, span_lint_and_then};

View file

@ -1,5 +1,3 @@
//! lint on inherent implementations
use clippy_utils::diagnostics::span_lint_and_then; use clippy_utils::diagnostics::span_lint_and_then;
use clippy_utils::is_lint_allowed; use clippy_utils::is_lint_allowed;
use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::fx::FxHashMap;

View file

@ -1,5 +1,3 @@
//! checks for `#[inline]` on trait methods without bodies
use clippy_utils::diagnostics::span_lint_and_then; use clippy_utils::diagnostics::span_lint_and_then;
use clippy_utils::sugg::DiagExt; use clippy_utils::sugg::DiagExt;
use rustc_errors::Applicability; use rustc_errors::Applicability;

View file

@ -1,5 +1,3 @@
//! lint on blocks unnecessarily using >= with a + 1 or - 1
use clippy_utils::diagnostics::span_lint_and_sugg; use clippy_utils::diagnostics::span_lint_and_sugg;
use clippy_utils::source::snippet_opt; use clippy_utils::source::snippet_opt;
use rustc_ast::ast::{BinOpKind, Expr, ExprKind, LitKind}; use rustc_ast::ast::{BinOpKind, Expr, ExprKind, LitKind};

View file

@ -1,5 +1,3 @@
//! lint on enum variants that are prefixed or suffixed by the same characters
use clippy_config::Conf; use clippy_config::Conf;
use clippy_utils::diagnostics::{span_lint, span_lint_and_help, span_lint_hir}; use clippy_utils::diagnostics::{span_lint, span_lint_and_help, span_lint_hir};
use clippy_utils::is_bool; use clippy_utils::is_bool;

View file

@ -1,5 +1,3 @@
//! lint when items are used after statements
use clippy_utils::diagnostics::span_lint_hir; use clippy_utils::diagnostics::span_lint_hir;
use rustc_hir::{Block, ItemKind, StmtKind}; use rustc_hir::{Block, ItemKind, StmtKind};
use rustc_lint::{LateContext, LateLintPass, LintContext}; use rustc_lint::{LateContext, LateLintPass, LintContext};

View file

@ -1,5 +1,3 @@
//! lint when there is a large size difference between variants on an enum
use clippy_config::Conf; use clippy_config::Conf;
use clippy_utils::diagnostics::span_lint_and_then; use clippy_utils::diagnostics::span_lint_and_then;
use clippy_utils::source::snippet_with_applicability; use clippy_utils::source::snippet_with_applicability;

View file

@ -1,6 +1,3 @@
//! Lints concerned with the grouping of digits with underscores in integral or
//! floating-point literal expressions.
use clippy_config::Conf; use clippy_config::Conf;
use clippy_utils::diagnostics::span_lint_and_then; use clippy_utils::diagnostics::span_lint_and_then;
use clippy_utils::numeric_literal::{NumericLiteral, Radix}; use clippy_utils::numeric_literal::{NumericLiteral, Radix};

View file

@ -1,5 +1,3 @@
//! Lint for `c.is_digit(10)`
use super::IS_DIGIT_ASCII_RADIX; use super::IS_DIGIT_ASCII_RADIX;
use clippy_config::msrvs::{self, Msrv}; use clippy_config::msrvs::{self, Msrv};
use clippy_utils::consts::{ConstEvalCtxt, FullInt}; use clippy_utils::consts::{ConstEvalCtxt, FullInt};

View file

@ -1,7 +1,3 @@
//! Checks for usage of mutex where an atomic value could be used
//!
//! This lint is **allow** by default
use clippy_utils::diagnostics::span_lint; use clippy_utils::diagnostics::span_lint;
use clippy_utils::ty::is_type_diagnostic_item; use clippy_utils::ty::is_type_diagnostic_item;
use rustc_hir::Expr; use rustc_hir::Expr;

View file

@ -1,7 +1,3 @@
//! Checks for needless boolean results of if-else expressions
//!
//! This lint is **warn** by default
use clippy_utils::diagnostics::{span_lint, span_lint_and_sugg}; use clippy_utils::diagnostics::{span_lint, span_lint_and_sugg};
use clippy_utils::source::snippet_with_applicability; use clippy_utils::source::snippet_with_applicability;
use clippy_utils::sugg::Sugg; use clippy_utils::sugg::Sugg;

View file

@ -1,38 +1,3 @@
//! Checks for continue statements in loops that are redundant.
//!
//! For example, the lint would catch
//!
//! ```rust
//! let mut a = 1;
//! let x = true;
//!
//! while a < 5 {
//! a = 6;
//! if x {
//! // ...
//! } else {
//! continue;
//! }
//! println!("Hello, world");
//! }
//! ```
//!
//! And suggest something like this:
//!
//! ```rust
//! let mut a = 1;
//! let x = true;
//!
//! while a < 5 {
//! a = 6;
//! if x {
//! // ...
//! println!("Hello, world");
//! }
//! }
//! ```
//!
//! This lint is **warn** by default.
use clippy_utils::diagnostics::span_lint_and_help; use clippy_utils::diagnostics::span_lint_and_help;
use clippy_utils::source::{indent_of, snippet, snippet_block}; use clippy_utils::source::{indent_of, snippet, snippet_block};
use rustc_ast::ast; use rustc_ast::ast;

View file

@ -1,7 +1,3 @@
//! Checks for usage of const which the type is not `Freeze` (`Cell`-free).
//!
//! This lint is **warn** by default.
use std::ptr; use std::ptr;
use clippy_config::Conf; use clippy_config::Conf;

View file

@ -1,5 +1,3 @@
//! Checks for usage of `&Vec[_]` and `&String`.
use clippy_utils::diagnostics::{span_lint, span_lint_and_sugg, span_lint_and_then, span_lint_hir_and_then}; use clippy_utils::diagnostics::{span_lint, span_lint_and_sugg, span_lint_and_then, span_lint_hir_and_then};
use clippy_utils::source::SpanRangeExt; use clippy_utils::source::SpanRangeExt;
use clippy_utils::ty::expr_sig; use clippy_utils::ty::expr_sig;

View file

@ -1,6 +1,3 @@
//! Lint on use of `size_of` or `size_of_val` of T in an expression
//! expecting a count of T
use clippy_utils::diagnostics::span_lint_and_help; use clippy_utils::diagnostics::span_lint_and_help;
use rustc_hir::{BinOpKind, Expr, ExprKind}; use rustc_hir::{BinOpKind, Expr, ExprKind};
use rustc_lint::{LateContext, LateLintPass}; use rustc_lint::{LateContext, LateLintPass};

View file

@ -1,6 +1,3 @@
//! A group of attributes that can be attached to Rust code in order
//! to generate a clippy lint detecting said code automatically.
use clippy_utils::{get_attr, higher}; use clippy_utils::{get_attr, higher};
use rustc_ast::ast::{LitFloatType, LitKind}; use rustc_ast::ast::{LitFloatType, LitKind};
use rustc_ast::LitIntType; use rustc_ast::LitIntType;