Skip to content

Commit 7bb54d9

Browse files
authored
Rustup (#14539)
r? @ghost changelog: none
2 parents a2251a8 + c97bd74 commit 7bb54d9

Some content is hidden

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

57 files changed

+288
-851
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "clippy"
33
# begin autogenerated version
4-
version = "0.1.87"
4+
version = "0.1.88"
55
# end autogenerated version
66
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
77
repository = "https://github.com/rust-lang/rust-clippy"

clippy_config/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "clippy_config"
33
# begin autogenerated version
4-
version = "0.1.87"
4+
version = "0.1.88"
55
# end autogenerated version
66
edition = "2024"
77
publish = false

clippy_lints/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "clippy_lints"
33
# begin autogenerated version
4-
version = "0.1.87"
4+
version = "0.1.88"
55
# end autogenerated version
66
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
77
repository = "https://github.com/rust-lang/rust-clippy"

clippy_lints/src/attrs/duplicated_attributes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ fn check_duplicated_attr(
3636
}
3737
let Some(ident) = attr.ident() else { return };
3838
let name = ident.name;
39-
if name == sym::doc || name == sym::cfg_attr || name == sym::rustc_on_unimplemented || name == sym::reason {
39+
if name == sym::doc || name == sym::cfg_attr_trace || name == sym::rustc_on_unimplemented || name == sym::reason {
4040
// FIXME: Would be nice to handle `cfg_attr` as well. Only problem is to check that cfg
4141
// conditions are the same.
4242
// `#[rustc_on_unimplemented]` contains duplicated subattributes, that's expected.
4343
return;
4444
}
4545
if let Some(direct_parent) = parent.last()
46-
&& ["cfg", "cfg_attr"].contains(&direct_parent.as_str())
46+
&& direct_parent == sym::cfg_trace.as_str()
4747
&& [sym::all, sym::not, sym::any].contains(&name)
4848
{
4949
// FIXME: We don't correctly check `cfg`s for now, so if it's more complex than just a one

clippy_lints/src/casts/unnecessary_cast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ pub(super) fn check<'tcx>(
143143

144144
if cast_from.kind() == cast_to.kind() && !expr.span.in_external_macro(cx.sess().source_map()) {
145145
if let Some(id) = path_to_local(cast_expr)
146-
&& !cx.tcx.hir().span(id).eq_ctxt(cast_expr.span)
146+
&& !cx.tcx.hir_span(id).eq_ctxt(cast_expr.span)
147147
{
148148
// Binding context is different than the identifiers context.
149149
// Weird macro wizardry could be involved here.

clippy_lints/src/cfg_not_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ declare_lint_pass!(CfgNotTest => [CFG_NOT_TEST]);
3232

3333
impl EarlyLintPass for CfgNotTest {
3434
fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &rustc_ast::Attribute) {
35-
if attr.has_name(rustc_span::sym::cfg) && contains_not_test(attr.meta_item_list().as_deref(), false) {
35+
if attr.has_name(rustc_span::sym::cfg_trace) && contains_not_test(attr.meta_item_list().as_deref(), false) {
3636
span_lint_and_then(
3737
cx,
3838
CFG_NOT_TEST,

clippy_lints/src/crate_in_macro_def.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ declare_lint_pass!(CrateInMacroDef => [CRATE_IN_MACRO_DEF]);
5353

5454
impl EarlyLintPass for CrateInMacroDef {
5555
fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) {
56-
if let ItemKind::MacroDef(macro_def) = &item.kind
56+
if let ItemKind::MacroDef(_, macro_def) = &item.kind
5757
&& item.attrs.iter().any(is_macro_export)
5858
&& let Some(span) = contains_unhygienic_crate_reference(&macro_def.body.tokens)
5959
{

clippy_lints/src/declared_lints.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,6 @@ pub static LINTS: &[&crate::LintInfo] = &[
641641
crate::precedence::PRECEDENCE_INFO,
642642
crate::precedence::PRECEDENCE_BITS_INFO,
643643
crate::ptr::CMP_NULL_INFO,
644-
crate::ptr::INVALID_NULL_PTR_USAGE_INFO,
645644
crate::ptr::MUT_FROM_REF_INFO,
646645
crate::ptr::PTR_ARG_INFO,
647646
crate::ptr::PTR_EQ_INFO,

clippy_lints/src/default.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ impl<'tcx> LateLintPass<'tcx> for Default {
134134
&& let ty::Adt(adt, args) = *binding_type.kind()
135135
&& adt.is_struct()
136136
&& let variant = adt.non_enum_variant()
137-
&& (adt.did().is_local() || !variant.is_field_list_non_exhaustive())
137+
&& !variant.field_list_has_applicable_non_exhaustive()
138138
&& let module_did = cx.tcx.parent_module(stmt.hir_id)
139139
&& variant
140140
.fields

clippy_lints/src/deprecated_lints.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ declare_with_version! { RENAMED(RENAMED_VERSION): &[(&str, &str)] = &[
131131
("clippy::clone_double_ref", "suspicious_double_ref_op"),
132132
#[clippy::version = ""]
133133
("clippy::cmp_nan", "invalid_nan_comparisons"),
134+
#[clippy::version = "CURRENT_RUSTC_VERSION"]
135+
("clippy::invalid_null_ptr_usage", "invalid_null_arguments"),
134136
#[clippy::version = "1.86.0"]
135137
("clippy::double_neg", "double_negations"),
136138
#[clippy::version = ""]

0 commit comments

Comments
 (0)