Skip to content

Commit e645f93

Browse files
authored
Rustup (#16668)
r? @ghost changelog: none
2 parents 00a00eb + dfcb117 commit e645f93

File tree

183 files changed

+1629
-688
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+1629
-688
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy"
3-
version = "0.1.95"
3+
version = "0.1.96"
44
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
55
repository = "https://github.com/rust-lang/rust-clippy"
66
readme = "README.md"

clippy_config/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy_config"
3-
version = "0.1.95"
3+
version = "0.1.96"
44
edition = "2024"
55
publish = false
66

clippy_dev/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![feature(
22
exit_status_error,
3-
if_let_guard,
43
new_range,
54
new_range_api,
65
os_str_slice,

clippy_lints/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy_lints"
3-
version = "0.1.95"
3+
version = "0.1.96"
44
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
55
repository = "https://github.com/rust-lang/rust-clippy"
66
readme = "README.md"

clippy_lints/src/attrs/inline_always.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::INLINE_ALWAYS;
22
use clippy_utils::diagnostics::span_lint;
3-
use rustc_hir::attrs::{AttributeKind, InlineAttr};
3+
use rustc_hir::attrs::InlineAttr;
44
use rustc_hir::{Attribute, find_attr};
55
use rustc_lint::LateContext;
66
use rustc_span::Span;
@@ -11,7 +11,7 @@ pub(super) fn check(cx: &LateContext<'_>, span: Span, name: Symbol, attrs: &[Att
1111
return;
1212
}
1313

14-
if let Some(span) = find_attr!(attrs, AttributeKind::Inline(InlineAttr::Always, span) => *span) {
14+
if let Some(span) = find_attr!(attrs, Inline(InlineAttr::Always, span) => *span) {
1515
span_lint(
1616
cx,
1717
INLINE_ALWAYS,

clippy_lints/src/attrs/repr_attributes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use rustc_hir::attrs::{AttributeKind, ReprAttr};
1+
use rustc_hir::attrs::ReprAttr;
22
use rustc_hir::{Attribute, find_attr};
33
use rustc_lint::LateContext;
44
use rustc_span::Span;
@@ -9,7 +9,7 @@ use clippy_utils::msrvs::{self, Msrv};
99
use super::REPR_PACKED_WITHOUT_ABI;
1010

1111
pub(super) fn check(cx: &LateContext<'_>, item_span: Span, attrs: &[Attribute], msrv: Msrv) {
12-
if let Some(reprs) = find_attr!(attrs, AttributeKind::Repr { reprs, .. } => reprs) {
12+
if let Some(reprs) = find_attr!(attrs, Repr { reprs, .. } => reprs) {
1313
let packed_span = reprs
1414
.iter()
1515
.find(|(r, _)| matches!(r, ReprAttr::ReprPacked(..)))

clippy_lints/src/await_holding_invalid.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ use clippy_config::Conf;
22
use clippy_config::types::{DisallowedPathWithoutReplacement, create_disallowed_map};
33
use clippy_utils::diagnostics::span_lint_and_then;
44
use clippy_utils::paths::{self, PathNS};
5+
use clippy_utils::sym;
56
use rustc_hir as hir;
67
use rustc_hir::def_id::{DefId, DefIdMap};
78
use rustc_lint::{LateContext, LateLintPass};
89
use rustc_middle::mir::CoroutineLayout;
910
use rustc_middle::ty::TyCtxt;
1011
use rustc_session::impl_lint_pass;
11-
use rustc_span::{Span, sym};
12+
use rustc_span::Span;
1213

1314
declare_clippy_lint! {
1415
/// ### What it does

clippy_lints/src/box_default.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
use clippy_utils::diagnostics::span_lint_and_sugg;
2-
use clippy_utils::is_default_equivalent;
32
use clippy_utils::macros::macro_backtrace;
43
use clippy_utils::res::{MaybeDef, MaybeResPath};
54
use clippy_utils::ty::expr_sig;
5+
use clippy_utils::{is_default_equivalent, sym};
66
use rustc_errors::Applicability;
77
use rustc_hir::def::Res;
88
use rustc_hir::intravisit::{InferKind, Visitor, VisitorExt, walk_ty};
99
use rustc_hir::{AmbigArg, Block, Expr, ExprKind, HirId, LangItem, LetStmt, Node, QPath, Ty, TyKind};
1010
use rustc_lint::{LateContext, LateLintPass, LintContext};
1111
use rustc_session::declare_lint_pass;
12-
use rustc_span::{Span, sym};
12+
use rustc_span::Span;
1313

1414
declare_clippy_lint! {
1515
/// ### What it does

clippy_lints/src/casts/as_ptr_cast_mut.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use clippy_utils::diagnostics::span_lint_and_sugg;
22
use clippy_utils::source::SpanRangeExt;
3+
use clippy_utils::sym;
34
use rustc_errors::Applicability;
45
use rustc_hir::{Expr, ExprKind};
56
use rustc_lint::LateContext;
@@ -12,7 +13,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, cast_expr: &Expr<'_>,
1213
if let ty::RawPtr(ptrty, Mutability::Mut) = cast_to.kind()
1314
&& let ty::RawPtr(_, Mutability::Not) = cx.typeck_results().node_type(cast_expr.hir_id).kind()
1415
&& let ExprKind::MethodCall(method_name, receiver, [], _) = cast_expr.peel_blocks().kind
15-
&& method_name.ident.name == rustc_span::sym::as_ptr
16+
&& method_name.ident.name == sym::as_ptr
1617
&& let Some(as_ptr_did) = cx
1718
.typeck_results()
1819
.type_dependent_def_id(cast_expr.peel_blocks().hir_id)

clippy_lints/src/casts/unnecessary_cast.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ use clippy_utils::numeric_literal::NumericLiteral;
33
use clippy_utils::res::MaybeResPath as _;
44
use clippy_utils::source::{SpanRangeExt, snippet_opt};
55
use clippy_utils::visitors::{Visitable, for_each_expr_without_closures};
6-
use clippy_utils::{get_parent_expr, is_hir_ty_cfg_dependant, is_ty_alias};
6+
use clippy_utils::{get_parent_expr, is_hir_ty_cfg_dependant, is_ty_alias, sym};
77
use rustc_ast::{LitFloatType, LitIntType, LitKind};
88
use rustc_errors::Applicability;
99
use rustc_hir::def::{DefKind, Res};
1010
use rustc_hir::{Expr, ExprKind, FnRetTy, Lit, Node, Path, QPath, TyKind, UnOp};
1111
use rustc_lint::{LateContext, LintContext};
1212
use rustc_middle::ty::adjustment::Adjust;
1313
use rustc_middle::ty::{self, FloatTy, InferTy, Ty};
14-
use rustc_span::{Symbol, sym};
14+
use rustc_span::Symbol;
1515
use std::ops::ControlFlow;
1616

1717
use super::UNNECESSARY_CAST;

0 commit comments

Comments
 (0)