Skip to content

Commit a109190

Browse files
committed
Auto merge of #13561 - flip1995:rustup, r=flip1995
Rustup r? `@ghost` changelog: none
2 parents dae1be9 + 4b5d189 commit a109190

53 files changed

Lines changed: 138 additions & 156 deletions

Some content is hidden

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

‎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.83"
3+
version = "0.1.84"
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.83"
3+
version = "0.1.84"
44
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

‎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.83"
3+
version = "0.1.84"
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/allow_attributes_without_reason.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
usesuper::{ALLOW_ATTRIBUTES_WITHOUT_REASON,Attribute};
22
use clippy_utils::diagnostics::span_lint_and_then;
33
use clippy_utils::is_from_proc_macro;
4-
use rustc_ast::{MetaItemKind,NestedMetaItem};
4+
use rustc_ast::{MetaItemInner,MetaItemKind};
55
use rustc_lint::{LateContext,LintContext};
66
use rustc_middle::lint::in_external_macro;
77
use rustc_span::sym;
88
use rustc_span::symbol::Symbol;
99

10-
pub(super)fncheck<'cx>(cx:&LateContext<'cx>,name:Symbol,items:&[NestedMetaItem],attr:&'cxAttribute){
10+
pub(super)fncheck<'cx>(cx:&LateContext<'cx>,name:Symbol,items:&[MetaItemInner],attr:&'cxAttribute){
1111
// Check if the reason is present
12-
ifletSome(item) = items.last().and_then(NestedMetaItem::meta_item)
12+
ifletSome(item) = items.last().and_then(MetaItemInner::meta_item)
1313
&& letMetaItemKind::NameValue(_) = &item.kind
1414
&& item.path == sym::reason
1515
{

‎clippy_lints/src/attrs/blanket_clippy_restriction_lints.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
usesuper::BLANKET_CLIPPY_RESTRICTION_LINTS;
22
usesuper::utils::extract_clippy_lint;
33
use clippy_utils::diagnostics::{span_lint_and_help, span_lint_and_then};
4-
use rustc_ast::NestedMetaItem;
4+
use rustc_ast::MetaItemInner;
55
use rustc_lint::{LateContext,Level,LintContext};
66
use rustc_span::symbol::Symbol;
77
use rustc_span::{DUMMY_SP, sym};
88

9-
pub(super)fncheck(cx:&LateContext<'_>,name:Symbol,items:&[NestedMetaItem]){
9+
pub(super)fncheck(cx:&LateContext<'_>,name:Symbol,items:&[MetaItemInner]){
1010
for lint in items {
1111
ifletSome(lint_name) = extract_clippy_lint(lint){
1212
if lint_name.as_str() == "restriction" && name != sym::allow {

‎clippy_lints/src/attrs/mod.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ mod utils;
1414

1515
use clippy_config::Conf;
1616
use clippy_config::msrvs::{self,Msrv};
17-
use rustc_ast::{Attribute,MetaItemKind,NestedMetaItem};
17+
use rustc_ast::{Attribute,MetaItemInner,MetaItemKind};
1818
use rustc_hir::{ImplItem,Item,ItemKind,TraitItem};
1919
use rustc_lint::{EarlyContext,EarlyLintPass,LateContext,LateLintPass};
2020
use rustc_session::impl_lint_pass;
@@ -456,7 +456,7 @@ impl<'tcx> LateLintPass<'tcx> for Attributes {
456456
return;
457457
}
458458
for item in items {
459-
ifletNestedMetaItem::MetaItem(mi) = &item
459+
ifletMetaItemInner::MetaItem(mi) = &item
460460
&& letMetaItemKind::NameValue(lit) = &mi.kind
461461
&& mi.has_name(sym::since)
462462
{

‎clippy_lints/src/attrs/non_minimal_cfg.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
usesuper::{Attribute,NON_MINIMAL_CFG};
22
use clippy_utils::diagnostics::span_lint_and_then;
33
use clippy_utils::source::SpanRangeExt;
4-
use rustc_ast::{MetaItemKind,NestedMetaItem};
4+
use rustc_ast::{MetaItemInner,MetaItemKind};
55
use rustc_errors::Applicability;
66
use rustc_lint::EarlyContext;
77
use rustc_span::sym;
@@ -14,9 +14,9 @@ pub(super) fn check(cx: &EarlyContext<'_>, attr: &Attribute) {
1414
}
1515
}
1616

17-
fncheck_nested_cfg(cx:&EarlyContext<'_>,items:&[NestedMetaItem]){
17+
fncheck_nested_cfg(cx:&EarlyContext<'_>,items:&[MetaItemInner]){
1818
for item in items {
19-
ifletNestedMetaItem::MetaItem(meta) = item {
19+
ifletMetaItemInner::MetaItem(meta) = item {
2020
if !meta.has_name(sym::any) && !meta.has_name(sym::all){
2121
continue;
2222
}

‎clippy_lints/src/attrs/useless_attribute.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use super::utils::{extract_clippy_lint, is_lint_level, is_word};
22
usesuper::{Attribute,USELESS_ATTRIBUTE};
33
use clippy_utils::diagnostics::span_lint_and_then;
44
use clippy_utils::source::{SpanRangeExt, first_line_of_span};
5-
use rustc_ast::NestedMetaItem;
5+
use rustc_ast::MetaItemInner;
66
use rustc_errors::Applicability;
77
use rustc_hir::{Item,ItemKind};
88
use rustc_lint::{LateContext,LintContext};
@@ -21,7 +21,7 @@ pub(super) fn check(cx: &LateContext<'_>, item: &Item<'_>, attrs: &[Attribute])
2121
for lint in lint_list {
2222
match item.kind{
2323
ItemKind::Use(..) => {
24-
ifletNestedMetaItem::MetaItem(meta_item) = lint
24+
ifletMetaItemInner::MetaItem(meta_item) = lint
2525
&& meta_item.is_word()
2626
&& letSome(ident) = meta_item.ident()
2727
&& matches!(

‎clippy_lints/src/attrs/utils.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use clippy_utils::macros::{is_panic, macro_backtrace};
2-
use rustc_ast::{AttrId,NestedMetaItem};
2+
use rustc_ast::{AttrId,MetaItemInner};
33
use rustc_hir::{
44
Block,Expr,ExprKind,ImplItem,ImplItemKind,Item,ItemKind,StmtKind,TraitFn,TraitItem,TraitItemKind,
55
};
@@ -8,8 +8,8 @@ use rustc_middle::ty;
88
use rustc_span::sym;
99
use rustc_span::symbol::Symbol;
1010

11-
pub(super)fnis_word(nmi:&NestedMetaItem,expected:Symbol) -> bool{
12-
ifletNestedMetaItem::MetaItem(mi) = &nmi {
11+
pub(super)fnis_word(nmi:&MetaItemInner,expected:Symbol) -> bool{
12+
ifletMetaItemInner::MetaItem(mi) = &nmi {
1313
mi.is_word() && mi.has_name(expected)
1414
}else{
1515
false
@@ -74,7 +74,7 @@ fn is_relevant_expr(cx: &LateContext<'_>, typeck_results: &ty::TypeckResults<'_>
7474
}
7575

7676
/// Returns the lint name if it is clippy lint.
77-
pub(super)fnextract_clippy_lint(lint:&NestedMetaItem) -> Option<Symbol>{
77+
pub(super)fnextract_clippy_lint(lint:&MetaItemInner) -> Option<Symbol>{
7878
ifletSome(meta_item) = lint.meta_item()
7979
&& meta_item.path.segments.len() > 1
8080
&& let tool_name = meta_item.path.segments[0].ident

‎clippy_lints/src/cfg_not_test.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use clippy_utils::diagnostics::span_lint_and_then;
2-
use rustc_ast::NestedMetaItem;
2+
use rustc_ast::MetaItemInner;
33
use rustc_lint::{EarlyContext,EarlyLintPass};
44
use rustc_session::declare_lint_pass;
55

@@ -47,7 +47,7 @@ impl EarlyLintPass for CfgNotTest {
4747
}
4848
}
4949

50-
fncontains_not_test(list:Option<&[NestedMetaItem]>,not:bool) -> bool{
50+
fncontains_not_test(list:Option<&[MetaItemInner]>,not:bool) -> bool{
5151
list.is_some_and(|list| {
5252
list.iter().any(|item| {
5353
item.ident().is_some_and(|ident| match ident.name{

0 commit comments

Comments
 (0)