Skip to content

Commit 62589a2

Browse files
authored
Rustup (#16094)
r? @ghost changelog: none
2 parents c48592e + 72fc40c commit 62589a2

File tree

64 files changed

+368
-288
lines changed

Some content is hidden

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

64 files changed

+368
-288
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ tempfile = { version = "3.20", optional = true }
3131
termize = "0.2"
3232
color-print = "0.3.4"
3333
anstream = "0.6.18"
34+
tikv-jemalloc-sys = { version = "0.6.1", optional = true, features = ['override_allocator_on_supported_platforms'] }
3435

3536
[dev-dependencies]
3637
cargo_metadata = "0.18.1"
@@ -56,7 +57,7 @@ rustc_tools_util = { path = "rustc_tools_util", version = "0.4.2" }
5657
[features]
5758
integration = ["dep:tempfile"]
5859
internal = ["dep:clippy_lints_internal", "dep:tempfile"]
59-
jemalloc = []
60+
jemalloc = ["dep:tikv-jemalloc-sys"]
6061

6162
[package.metadata.rust-analyzer]
6263
# This package uses #[feature(rustc_private)]

book/src/development/infrastructure/changelog_update.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ written for. If not, update the version to the changelog version.
112112

113113
[changelog]: https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md
114114
[forge]: https://forge.rust-lang.org/
115-
[rust_master_tools]: https://github.com/rust-lang/rust/tree/master/src/tools/clippy
115+
[rust_master_tools]: https://github.com/rust-lang/rust/tree/HEAD/src/tools/clippy
116116
[rust_beta_tools]: https://github.com/rust-lang/rust/tree/beta/src/tools/clippy
117117
[rust_stable_tools]: https://github.com/rust-lang/rust/releases
118118
[`beta-accepted`]: https://github.com/rust-lang/rust-clippy/issues?q=label%3Abeta-accepted+

clippy_lints/src/disallowed_script_idents.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl_lint_pass!(DisallowedScriptIdents => [DISALLOWED_SCRIPT_IDENTS]);
6767
impl EarlyLintPass for DisallowedScriptIdents {
6868
fn check_crate(&mut self, cx: &EarlyContext<'_>, _: &ast::Crate) {
6969
// Implementation is heavily inspired by the implementation of [`non_ascii_idents`] lint:
70-
// https://github.com/rust-lang/rust/blob/master/compiler/rustc_lint/src/non_ascii_idents.rs
70+
// https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_lint/src/non_ascii_idents.rs
7171

7272
let check_disallowed_script_idents = cx.builder.lint_level(DISALLOWED_SCRIPT_IDENTS).level != Level::Allow;
7373
if !check_disallowed_script_idents {

clippy_lints/src/equatable_if_let.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fn unary_pattern(pat: &Pat<'_>) -> bool {
5555
| PatKind::Err(_) => false,
5656
PatKind::Struct(_, a, etc) => etc.is_none() && a.iter().all(|x| unary_pattern(x.pat)),
5757
PatKind::Tuple(a, etc) | PatKind::TupleStruct(_, a, etc) => etc.as_opt_usize().is_none() && array_rec(a),
58-
PatKind::Ref(x, _) | PatKind::Box(x) | PatKind::Deref(x) | PatKind::Guard(x, _) => unary_pattern(x),
58+
PatKind::Ref(x, _, _) | PatKind::Box(x) | PatKind::Deref(x) | PatKind::Guard(x, _) => unary_pattern(x),
5959
PatKind::Expr(_) => true,
6060
}
6161
}

clippy_lints/src/index_refutable_slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ fn find_slice_values(cx: &LateContext<'_>, pat: &hir::Pat<'_>) -> FxIndexMap<Hir
9494
// We'll just ignore mut and ref mut for simplicity sake right now
9595
if let hir::PatKind::Binding(hir::BindingMode(by_ref, hir::Mutability::Not), value_hir_id, ident, sub_pat) =
9696
pat.kind
97-
&& by_ref != hir::ByRef::Yes(hir::Mutability::Mut)
97+
&& !matches!(by_ref, hir::ByRef::Yes(_, hir::Mutability::Mut))
9898
{
9999
// This block catches bindings with sub patterns. It would be hard to build a correct suggestion
100100
// for them and it's likely that the user knows what they are doing in such a case.

clippy_lints/src/item_name_repetitions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ impl LateLintPass<'_> for ItemNameRepetitions {
528528
| ItemKind::Macro(ident, ..)
529529
| ItemKind::Static(_, ident, ..)
530530
| ItemKind::Trait(_, _, _, ident, ..)
531-
| ItemKind::TraitAlias(ident, ..)
531+
| ItemKind::TraitAlias(_, ident, ..)
532532
| ItemKind::TyAlias(ident, ..)
533533
| ItemKind::Union(ident, ..)
534534
| ItemKind::Use(_, UseKind::Single(ident)) => ident,

clippy_lints/src/loops/manual_find.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub(super) fn check<'tcx>(
4242
let mut snippet = make_iterator_snippet(cx, arg, &mut applicability);
4343
// Checks if `pat` is a single reference to a binding (`&x`)
4444
let is_ref_to_binding =
45-
matches!(pat.kind, PatKind::Ref(inner, _) if matches!(inner.kind, PatKind::Binding(..)));
45+
matches!(pat.kind, PatKind::Ref(inner, _, _) if matches!(inner.kind, PatKind::Binding(..)));
4646
// If `pat` is not a binding or a reference to a binding (`x` or `&x`)
4747
// we need to map it to the binding returned by the function (i.e. `.map(|(x, _)| x)`)
4848
if !(matches!(pat.kind, PatKind::Binding(..)) || is_ref_to_binding) {

clippy_lints/src/manual_retain.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ fn check_iter(
157157
),
158158
);
159159
},
160-
hir::PatKind::Ref(pat, _) => make_span_lint_and_sugg(
160+
hir::PatKind::Ref(pat, _, _) => make_span_lint_and_sugg(
161161
cx,
162162
parent_expr_span,
163163
format!(
@@ -196,7 +196,7 @@ fn check_to_owned(
196196
&& let filter_body = cx.tcx.hir_body(closure.body)
197197
&& let [filter_params] = filter_body.params
198198
&& msrv.meets(cx, msrvs::STRING_RETAIN)
199-
&& let hir::PatKind::Ref(pat, _) = filter_params.pat.kind
199+
&& let hir::PatKind::Ref(pat, _, _) = filter_params.pat.kind
200200
{
201201
make_span_lint_and_sugg(
202202
cx,

clippy_lints/src/matches/manual_ok_err.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ fn is_variant_or_wildcard(cx: &LateContext<'_>, pat: &Pat<'_>, can_be_wild: bool
7878
.is_lang_item(cx, ResultErr)
7979
== must_match_err
8080
},
81-
PatKind::Binding(_, _, _, Some(pat)) | PatKind::Ref(pat, _) => {
81+
PatKind::Binding(_, _, _, Some(pat)) | PatKind::Ref(pat, _, _) => {
8282
is_variant_or_wildcard(cx, pat, can_be_wild, must_match_err)
8383
},
8484
_ => false,

clippy_lints/src/matches/manual_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ pub(super) fn try_parse_pattern<'tcx>(
253253
) -> Option<OptionPat<'tcx>> {
254254
match pat.kind {
255255
PatKind::Wild => Some(OptionPat::Wild),
256-
PatKind::Ref(pat, _) => f(cx, pat, ref_count + 1, ctxt),
256+
PatKind::Ref(pat, _, _) => f(cx, pat, ref_count + 1, ctxt),
257257
_ if is_none_pattern(cx, pat) => Some(OptionPat::None),
258258
_ if let Some([pattern]) = as_some_pattern(cx, pat)
259259
&& pat.span.ctxt() == ctxt =>

0 commit comments

Comments
 (0)