Skip to content

Commit 43e3384

Browse files
committed
Auto merge of #13440 - flip1995:rustup, r=flip1995
Rustup r? `@ghost` changelog: none
2 parents abdf173 + 009134d commit 43e3384

File tree

402 files changed

+1435
-1410
lines changed

Some content is hidden

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

402 files changed

+1435
-1410
lines changed

clippy_config/src/conf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
use crate::ClippyConfiguration;
12
use crate::msrvs::Msrv;
23
use crate::types::{DisallowedPath, MacroMatcher, MatchLintBehaviour, PubUnderscoreFieldsBehaviour, Rename};
3-
use crate::ClippyConfiguration;
44
use rustc_errors::Applicability;
55
use rustc_session::Session;
66
use rustc_span::edit_distance::edit_distance;

clippy_config/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ mod metadata;
2626
pub mod msrvs;
2727
pub mod types;
2828

29-
pub use conf::{get_configuration_metadata, lookup_conf_file, Conf};
29+
pub use conf::{Conf, get_configuration_metadata, lookup_conf_file};
3030
pub use metadata::ClippyConfiguration;

clippy_config/src/msrvs.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use rustc_ast::Attribute;
22
use rustc_attr::parse_version;
33
use rustc_session::{RustcVersion, Session};
4-
use rustc_span::{sym, Symbol};
4+
use rustc_span::{Symbol, sym};
55
use serde::Deserialize;
66
use std::fmt;
77

@@ -17,7 +17,9 @@ macro_rules! msrv_aliases {
1717

1818
// names may refer to stabilized feature flags or library items
1919
msrv_aliases! {
20-
1,81,0 { LINT_REASONS_STABILIZATION }
20+
1,83,0 { CONST_EXTERN_FN }
21+
1,83,0 { CONST_FLOAT_BITS_CONV }
22+
1,81,0 { LINT_REASONS_STABILIZATION }
2123
1,80,0 { BOX_INTO_ITER}
2224
1,77,0 { C_STR_LITERALS }
2325
1,76,0 { PTR_FROM_REF, OPTION_RESULT_INSPECT }
@@ -27,7 +29,7 @@ msrv_aliases! {
2729
1,68,0 { PATH_MAIN_SEPARATOR_STR }
2830
1,65,0 { LET_ELSE, POINTER_CAST_CONSTNESS }
2931
1,63,0 { CLONE_INTO }
30-
1,62,0 { BOOL_THEN_SOME, DEFAULT_ENUM_ATTRIBUTE, CONST_EXTERN_FN }
32+
1,62,0 { BOOL_THEN_SOME, DEFAULT_ENUM_ATTRIBUTE, CONST_EXTERN_C_FN }
3133
1,59,0 { THREAD_LOCAL_CONST_INIT }
3234
1,58,0 { FORMAT_ARGS_CAPTURE, PATTERN_TRAIT_CHAR_ARRAY, CONST_RAW_PTR_DEREF }
3335
1,56,0 { CONST_FN_UNION }

clippy_config/src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use serde::de::{self, Deserializer, Visitor};
2-
use serde::{ser, Deserialize, Serialize};
2+
use serde::{Deserialize, Serialize, ser};
33
use std::fmt;
44

55
#[derive(Debug, Deserialize)]

clippy_dev/src/fmt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::clippy_project_root;
22
use itertools::Itertools;
3-
use rustc_lexer::{tokenize, TokenKind};
3+
use rustc_lexer::{TokenKind, tokenize};
44
use shell_escape::escape;
55
use std::ffi::{OsStr, OsString};
66
use std::ops::ControlFlow;

clippy_dev/src/new_lint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ fn create_lint_for_ty(lint: &LintData<'_>, enable_msrv: bool, ty: &str) -> io::R
441441

442442
#[allow(clippy::too_many_lines)]
443443
fn setup_mod_file(path: &Path, lint: &LintData<'_>) -> io::Result<&'static str> {
444-
use super::update_lints::{match_tokens, LintDeclSearchResult};
444+
use super::update_lints::{LintDeclSearchResult, match_tokens};
445445
use rustc_lexer::TokenKind;
446446

447447
let lint_name_upper = lint.name.to_uppercase();

clippy_dev/src/update_lints.rs

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::clippy_project_root;
22
use aho_corasick::AhoCorasickBuilder;
33
use itertools::Itertools;
4-
use rustc_lexer::{tokenize, unescape, LiteralKind, TokenKind};
4+
use rustc_lexer::{LiteralKind, TokenKind, tokenize, unescape};
55
use std::collections::{HashMap, HashSet};
66
use std::ffi::OsStr;
77
use std::fmt::{self, Write};
@@ -1048,23 +1048,17 @@ mod tests {
10481048
Lint::new("incorrect_match", "group1", "\"abc\"", "module_name", Range::default()),
10491049
];
10501050
let mut expected: HashMap<String, Vec<Lint>> = HashMap::new();
1051-
expected.insert(
1052-
"group1".to_string(),
1053-
vec![
1054-
Lint::new("should_assert_eq", "group1", "\"abc\"", "module_name", Range::default()),
1055-
Lint::new("incorrect_match", "group1", "\"abc\"", "module_name", Range::default()),
1056-
],
1057-
);
1058-
expected.insert(
1059-
"group2".to_string(),
1060-
vec![Lint::new(
1061-
"should_assert_eq2",
1062-
"group2",
1063-
"\"abc\"",
1064-
"module_name",
1065-
Range::default(),
1066-
)],
1067-
);
1051+
expected.insert("group1".to_string(), vec![
1052+
Lint::new("should_assert_eq", "group1", "\"abc\"", "module_name", Range::default()),
1053+
Lint::new("incorrect_match", "group1", "\"abc\"", "module_name", Range::default()),
1054+
]);
1055+
expected.insert("group2".to_string(), vec![Lint::new(
1056+
"should_assert_eq2",
1057+
"group2",
1058+
"\"abc\"",
1059+
"module_name",
1060+
Range::default(),
1061+
)]);
10681062
assert_eq!(expected, Lint::by_lint_group(lints.into_iter()));
10691063
}
10701064
}

clippy_lints/src/absolute_paths.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ use clippy_utils::diagnostics::span_lint;
33
use clippy_utils::is_from_proc_macro;
44
use rustc_data_structures::fx::FxHashSet;
55
use rustc_hir::def::{DefKind, Res};
6-
use rustc_hir::def_id::{DefId, CRATE_DEF_INDEX};
6+
use rustc_hir::def_id::{CRATE_DEF_INDEX, DefId};
77
use rustc_hir::{HirId, ItemKind, Node, Path};
88
use rustc_lint::{LateContext, LateLintPass};
99
use rustc_session::impl_lint_pass;
10-
use rustc_span::symbol::kw;
1110
use rustc_span::Symbol;
11+
use rustc_span::symbol::kw;
1212

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

clippy_lints/src/almost_complete_range.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use clippy_config::msrvs::{self, Msrv};
21
use clippy_config::Conf;
2+
use clippy_config::msrvs::{self, Msrv};
33
use clippy_utils::diagnostics::span_lint_and_then;
44
use clippy_utils::source::{trim_span, walk_span_to_context};
55
use rustc_ast::ast::{Expr, ExprKind, LitKind, Pat, PatKind, RangeEnd, RangeLimits};

clippy_lints/src/approx_const.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
use clippy_config::msrvs::{self, Msrv};
21
use clippy_config::Conf;
2+
use clippy_config::msrvs::{self, Msrv};
33
use clippy_utils::diagnostics::span_lint_and_help;
44
use rustc_ast::ast::{FloatTy, LitFloatType, LitKind};
55
use rustc_hir::{Expr, ExprKind};
66
use rustc_lint::{LateContext, LateLintPass};
7-
use rustc_session::{impl_lint_pass, RustcVersion};
7+
use rustc_session::{RustcVersion, impl_lint_pass};
88
use rustc_span::symbol;
99
use std::f64::consts as f64;
1010

0 commit comments

Comments
 (0)