Skip to content

Commit 80dcff7

Browse files
committed
Auto merge of #152533 - flip1995:clippy-subtree-update, r=<try>
Clippy subtree update try-job: i686-msvc-1
2 parents d7daac0 + eaad11c commit 80dcff7

File tree

102 files changed

+971
-285
lines changed

Some content is hidden

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

102 files changed

+971
-285
lines changed

compiler/rustc_codegen_gcc/src/declare.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
151151
///
152152
/// If there’s a value with the same name already declared, the function will
153153
/// update the declaration and return existing Value instead.
154-
#[expect(clippy::let_and_return)]
155154
fn declare_raw_fn<'gcc>(
156155
cx: &CodegenCx<'gcc, '_>,
157156
name: &str,

src/tools/clippy/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ walkdir = "2.3"
4242
filetime = "0.2.9"
4343
itertools = "0.12"
4444
pulldown-cmark = { version = "0.11", default-features = false, features = ["html"] }
45-
askama = { version = "0.15", default-features = false, features = ["alloc", "config", "derive"] }
45+
askama = { version = "0.15.4", default-features = false, features = ["alloc", "config", "derive"] }
4646

4747
[dev-dependencies.toml]
4848
version = "0.9.7"

src/tools/clippy/book/src/development/infrastructure/sync.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ to be run inside the `rust` directory):
7979
```bash
8080
git fetch upstream # assuming upstream is the rust-lang/rust remote
8181
git switch rustup
82-
git merge upstream/master --no-ff
82+
git merge upstream/main --no-ff
8383
```
8484
> Note: This is one of the few instances where a merge commit is allowed in
8585
> a PR.
@@ -99,7 +99,7 @@ to be run inside the `rust` directory):
9999

100100
All the following commands have to be run inside the `rust` directory.
101101

102-
1. Make sure you have checked out the latest `master` of `rust-lang/rust`.
102+
1. Make sure you have checked out the latest `main` of `rust-lang/rust`.
103103
2. Sync the `rust-lang/rust-clippy` master to the rust-copy of Clippy:
104104
```bash
105105
git switch -c clippy-subtree-update

src/tools/clippy/book/src/development/type_checking.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,15 @@ in this chapter:
146146

147147
- [Stages of compilation](https://rustc-dev-guide.rust-lang.org/compiler-src.html#the-main-stages-of-compilation)
148148
- [Diagnostic items](https://rustc-dev-guide.rust-lang.org/diagnostics/diagnostic-items.html)
149-
- [Type checking](https://rustc-dev-guide.rust-lang.org/type-checking.html)
149+
- [Type checking](https://rustc-dev-guide.rust-lang.org/hir-typeck/summary.html)
150150
- [Ty module](https://rustc-dev-guide.rust-lang.org/ty.html)
151151

152152
[Adt]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/ty_kind/enum.TyKind.html#variant.Adt
153153
[AdtDef]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/adt/struct.AdtDef.html
154154
[expr_ty]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TypeckResults.html#method.expr_ty
155155
[node_type]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TypeckResults.html#method.node_type
156156
[is_char]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.Ty.html#method.is_char
157-
[is_char_source]: https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_middle/ty/sty.rs.html#1831-1834
157+
[is_char_source]: https://github.com/rust-lang/rust/blob/d34f1f931489618efffc4007e6b6bdb9e10f6467/compiler/rustc_middle/src/ty/sty.rs#L1429-L1432
158158
[kind]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.Ty.html#method.kind
159159
[LateContext]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/struct.LateContext.html
160160
[LateLintPass]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/trait.LateLintPass.html
@@ -163,5 +163,5 @@ in this chapter:
163163
[TyKind]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/ty_kind/enum.TyKind.html
164164
[TypeckResults]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TypeckResults.html
165165
[middle_ty]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.Ty.html
166-
[hir_ty]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/struct.Ty.html
166+
[hir_ty]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/hir/struct.Ty.html
167167
[lower_ty]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir_analysis/fn.lower_ty.html

src/tools/clippy/book/src/lint_configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ A list of crate names to allow duplicates of
246246

247247
## `allowed-idents-below-min-chars`
248248
Allowed names below the minimum allowed characters. The value `".."` can be used as part of
249-
the list to indicate, that the configured values should be appended to the default
249+
the list to indicate that the configured values should be appended to the default
250250
configuration of Clippy. By default, any configuration will replace the default value.
251251

252252
**Default Value:** `["i", "j", "x", "y", "z", "w", "n"]`
@@ -570,12 +570,12 @@ The list of disallowed types, written as fully qualified paths.
570570

571571
## `doc-valid-idents`
572572
The list of words this lint should not consider as identifiers needing ticks. The value
573-
`".."` can be used as part of the list to indicate, that the configured values should be appended to the
573+
`".."` can be used as part of the list to indicate that the configured values should be appended to the
574574
default configuration of Clippy. By default, any configuration will replace the default value. For example:
575575
* `doc-valid-idents = ["ClipPy"]` would replace the default list with `["ClipPy"]`.
576576
* `doc-valid-idents = ["ClipPy", ".."]` would append `ClipPy` to the default list.
577577

578-
**Default Value:** `["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "MHz", "GHz", "THz", "AccessKit", "CoAP", "CoreFoundation", "CoreGraphics", "CoreText", "DevOps", "Direct2D", "Direct3D", "DirectWrite", "DirectX", "ECMAScript", "GPLv2", "GPLv3", "GitHub", "GitLab", "IPv4", "IPv6", "InfiniBand", "RoCE", "ClojureScript", "CoffeeScript", "JavaScript", "PostScript", "PureScript", "TypeScript", "PowerPC", "WebAssembly", "NaN", "NaNs", "OAuth", "GraphQL", "OCaml", "OpenAL", "OpenDNS", "OpenGL", "OpenMP", "OpenSSH", "OpenSSL", "OpenStreetMap", "OpenTelemetry", "OpenType", "WebGL", "WebGL2", "WebGPU", "WebRTC", "WebSocket", "WebTransport", "WebP", "OpenExr", "YCbCr", "sRGB", "TensorFlow", "TrueType", "iOS", "macOS", "FreeBSD", "NetBSD", "OpenBSD", "NixOS", "TeX", "LaTeX", "BibTeX", "BibLaTeX", "MinGW", "CamelCase"]`
578+
**Default Value:** `["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "MHz", "GHz", "THz", "AccessKit", "CoAP", "CoreFoundation", "CoreGraphics", "CoreText", "DevOps", "Direct2D", "Direct3D", "DirectWrite", "DirectX", "ECMAScript", "GPLv2", "GPLv3", "GitHub", "GitLab", "IPv4", "IPv6", "InfiniBand", "RoCE", "ClojureScript", "CoffeeScript", "JavaScript", "PostScript", "PureScript", "TypeScript", "PowerPC", "PowerShell", "WebAssembly", "NaN", "NaNs", "OAuth", "GraphQL", "OCaml", "OpenAL", "OpenDNS", "OpenGL", "OpenMP", "OpenSSH", "OpenSSL", "OpenStreetMap", "OpenTelemetry", "OpenType", "WebGL", "WebGL2", "WebGPU", "WebRTC", "WebSocket", "WebTransport", "WebP", "OpenExr", "YCbCr", "sRGB", "TensorFlow", "TrueType", "iOS", "macOS", "FreeBSD", "NetBSD", "OpenBSD", "NixOS", "TeX", "LaTeX", "BibTeX", "BibLaTeX", "MinGW", "CamelCase"]`
579579

580580
---
581581
**Affected lints:**

src/tools/clippy/clippy_config/src/conf.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const DEFAULT_DOC_VALID_IDENTS: &[&str] = &[
3535
"IPv4", "IPv6",
3636
"InfiniBand", "RoCE",
3737
"ClojureScript", "CoffeeScript", "JavaScript", "PostScript", "PureScript", "TypeScript",
38-
"PowerPC", "WebAssembly",
38+
"PowerPC", "PowerShell", "WebAssembly",
3939
"NaN", "NaNs",
4040
"OAuth", "GraphQL",
4141
"OCaml",
@@ -423,7 +423,7 @@ define_Conf! {
423423
#[lints(multiple_crate_versions)]
424424
allowed_duplicate_crates: Vec<String> = Vec::new(),
425425
/// Allowed names below the minimum allowed characters. The value `".."` can be used as part of
426-
/// the list to indicate, that the configured values should be appended to the default
426+
/// the list to indicate that the configured values should be appended to the default
427427
/// configuration of Clippy. By default, any configuration will replace the default value.
428428
#[lints(min_ident_chars)]
429429
allowed_idents_below_min_chars: Vec<String> =
@@ -620,7 +620,7 @@ define_Conf! {
620620
#[lints(disallowed_types)]
621621
disallowed_types: Vec<DisallowedPath> = Vec::new(),
622622
/// The list of words this lint should not consider as identifiers needing ticks. The value
623-
/// `".."` can be used as part of the list to indicate, that the configured values should be appended to the
623+
/// `".."` can be used as part of the list to indicate that the configured values should be appended to the
624624
/// default configuration of Clippy. By default, any configuration will replace the default value. For example:
625625
/// * `doc-valid-idents = ["ClipPy"]` would replace the default list with `["ClipPy"]`.
626626
/// * `doc-valid-idents = ["ClipPy", ".."]` would append `ClipPy` to the default list.

src/tools/clippy/clippy_dev/src/new_lint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ fn add_lint(lint: &LintData<'_>, enable_msrv: bool) -> io::Result<()> {
167167
let camel_name = to_camel_case(lint.name);
168168

169169
let new_lint = if enable_msrv {
170-
format!("Box::new(move |{ctor_arg}| Box::new({module_name}::{camel_name}::new(conf))),\n ",)
170+
format!("Box::new(move |{ctor_arg}| Box::new({module_name}::{camel_name}::new(conf))),\n ")
171171
} else {
172-
format!("Box::new(|{ctor_arg}| Box::new({module_name}::{camel_name})),\n ",)
172+
format!("Box::new(|{ctor_arg}| Box::new({module_name}::{camel_name})),\n ")
173173
};
174174

175175
lib_rs.insert_str(comment_start, &new_lint);

src/tools/clippy/clippy_lints/src/attrs/useless_attribute.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ pub(super) fn check(cx: &EarlyContext<'_>, item: &Item, attrs: &[Attribute]) {
3131
| sym::dead_code
3232
| sym::deprecated
3333
| sym::deprecated_in_future
34+
| sym::exported_private_dependencies
3435
| sym::hidden_glob_reexports
3536
| sym::unreachable_pub
3637
| sym::unused

src/tools/clippy/clippy_lints/src/cargo/lint_groups_priority.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ fn check_table(cx: &LateContext<'_>, table: &DeTable<'_>, known_groups: &FxHashS
100100
"to have lints override the group set `{}` to a lower priority",
101101
group.as_ref()
102102
),
103-
format!("{{ level = {:?}, priority = {low_priority} }}", group_config.level,),
103+
format!("{{ level = {:?}, priority = {low_priority} }}", group_config.level),
104104
Applicability::MaybeIncorrect,
105105
);
106106
},

src/tools/clippy/clippy_lints/src/casts/cast_possible_truncation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ pub(super) fn check(
117117
return;
118118
}
119119

120-
format!("casting `{cast_from}` to `{cast_to}` may truncate the value{suffix}",)
120+
format!("casting `{cast_from}` to `{cast_to}` may truncate the value{suffix}")
121121
},
122122

123123
(ty::Adt(def, _), Some(to_nbits)) if def.is_enum() => {

0 commit comments

Comments
 (0)