mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-03 18:09:42 +00:00
Remove redundant doc comments
This commit is contained in:
parent
ed46141081
commit
9aa656df9f
26 changed files with 0 additions and 108 deletions
|
@ -1,5 +1,3 @@
|
|||
//! checks for attributes
|
||||
|
||||
mod allow_attributes;
|
||||
mod allow_attributes_without_reason;
|
||||
mod blanket_clippy_restriction_lints;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
//! lint on missing cargo common metadata
|
||||
|
||||
use cargo_metadata::Metadata;
|
||||
use clippy_utils::diagnostics::span_lint;
|
||||
use rustc_lint::LateContext;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
//! lint on multiple versions of a crate being used
|
||||
|
||||
use cargo_metadata::{DependencyKind, Metadata, Node, Package, PackageId};
|
||||
use clippy_utils::diagnostics::span_lint;
|
||||
use itertools::Itertools;
|
||||
|
|
|
@ -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::Conf;
|
||||
use clippy_utils::diagnostics::span_lint_and_sugg;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
//! calculate cognitive complexity and warn about overly complex functions
|
||||
|
||||
use clippy_config::Conf;
|
||||
use clippy_utils::diagnostics::span_lint_and_help;
|
||||
use clippy_utils::source::{IntoSpan, SpanRangeExt};
|
||||
|
|
|
@ -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::source::{snippet, snippet_block, snippet_block_with_applicability};
|
||||
use clippy_utils::sugg::Sugg;
|
||||
|
|
|
@ -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 rustc_ast::ast::{Expr, ExprKind};
|
||||
use rustc_lint::{EarlyContext, EarlyLintPass, LintContext};
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
//! lint when there is an enum with no variants
|
||||
|
||||
use clippy_utils::diagnostics::span_lint_and_help;
|
||||
use rustc_hir::{Item, ItemKind};
|
||||
use rustc_lint::{LateContext, LateLintPass};
|
||||
|
|
|
@ -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::diagnostics::span_lint;
|
||||
use rustc_hir::{Item, ItemKind};
|
||||
|
|
|
@ -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::diagnostics::span_lint_and_help;
|
||||
use clippy_utils::is_else_clause;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
//! lint on indexing and slicing operations
|
||||
|
||||
use clippy_config::Conf;
|
||||
use clippy_utils::consts::{ConstEvalCtxt, Constant};
|
||||
use clippy_utils::diagnostics::{span_lint, span_lint_and_then};
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
//! lint on inherent implementations
|
||||
|
||||
use clippy_utils::diagnostics::span_lint_and_then;
|
||||
use clippy_utils::is_lint_allowed;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
//! checks for `#[inline]` on trait methods without bodies
|
||||
|
||||
use clippy_utils::diagnostics::span_lint_and_then;
|
||||
use clippy_utils::sugg::DiagExt;
|
||||
use rustc_errors::Applicability;
|
||||
|
|
|
@ -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::source::snippet_opt;
|
||||
use rustc_ast::ast::{BinOpKind, Expr, ExprKind, LitKind};
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
//! lint on enum variants that are prefixed or suffixed by the same characters
|
||||
|
||||
use clippy_config::Conf;
|
||||
use clippy_utils::diagnostics::{span_lint, span_lint_and_help, span_lint_hir};
|
||||
use clippy_utils::is_bool;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
//! lint when items are used after statements
|
||||
|
||||
use clippy_utils::diagnostics::span_lint_hir;
|
||||
use rustc_hir::{Block, ItemKind, StmtKind};
|
||||
use rustc_lint::{LateContext, LateLintPass, LintContext};
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
//! lint when there is a large size difference between variants on an enum
|
||||
|
||||
use clippy_config::Conf;
|
||||
use clippy_utils::diagnostics::span_lint_and_then;
|
||||
use clippy_utils::source::snippet_with_applicability;
|
||||
|
|
|
@ -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_utils::diagnostics::span_lint_and_then;
|
||||
use clippy_utils::numeric_literal::{NumericLiteral, Radix};
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
//! Lint for `c.is_digit(10)`
|
||||
|
||||
use super::IS_DIGIT_ASCII_RADIX;
|
||||
use clippy_config::msrvs::{self, Msrv};
|
||||
use clippy_utils::consts::{ConstEvalCtxt, FullInt};
|
||||
|
|
|
@ -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::ty::is_type_diagnostic_item;
|
||||
use rustc_hir::Expr;
|
||||
|
|
|
@ -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::source::snippet_with_applicability;
|
||||
use clippy_utils::sugg::Sugg;
|
||||
|
|
|
@ -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::source::{indent_of, snippet, snippet_block};
|
||||
use rustc_ast::ast;
|
||||
|
|
|
@ -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 clippy_config::Conf;
|
||||
|
|
|
@ -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::source::SpanRangeExt;
|
||||
use clippy_utils::ty::expr_sig;
|
||||
|
|
|
@ -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 rustc_hir::{BinOpKind, Expr, ExprKind};
|
||||
use rustc_lint::{LateContext, LateLintPass};
|
||||
|
|
|
@ -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 rustc_ast::ast::{LitFloatType, LitKind};
|
||||
use rustc_ast::LitIntType;
|
||||
|
|
Loading…
Reference in a new issue