Skip to content

Commit 940e2ef

Browse files
committed
Merge ref 'df8102fe5f24:/library/compiler-builtins' from https://github.com/rust-lang/rust
Pull recent changes from rust-lang/rust via Josh. Upstream ref: df8102fe5f24f28a918660b0cd918d7331c3896e Filtered ref: 3c30d8cb1ec24e0b8a88a5cedcf6b9bece0117d7
2 parents 787addb + a14ad70 commit 940e2ef

File tree

391 files changed

+8227
-5353
lines changed

Some content is hidden

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

391 files changed

+8227
-5353
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6440,6 +6440,7 @@ Released 2018-09-13
64406440
[`used_underscore_items`]: https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_items
64416441
[`useless_asref`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref
64426442
[`useless_attribute`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_attribute
6443+
[`useless_concat`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_concat
64436444
[`useless_conversion`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
64446445
[`useless_format`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
64456446
[`useless_let_if_seq`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Clippy team directly by mentioning them in the issue or over on [Zulip]. All
5151
currently active team members can be found
5252
[here](https://github.com/rust-lang/rust-clippy/blob/master/triagebot.toml#L18)
5353

54-
Some issues are easier than others. The [`good-first-issue`] label can be used to find the easy
54+
Some issues are easier than others. The [`good first issue`] label can be used to find the easy
5555
issues. You can use `@rustbot claim` to assign the issue to yourself.
5656

5757
There are also some abandoned PRs, marked with [`S-inactive-closed`].
@@ -70,7 +70,7 @@ To figure out how this syntax structure is encoded in the AST, it is recommended
7070
Usually the lint will end up to be a nested series of matches and ifs, [like so][deep-nesting].
7171
But we can make it nest-less by using [let chains], [like this][nest-less].
7272

73-
[`E-medium`] issues are generally pretty easy too, though it's recommended you work on an [`good-first-issue`]
73+
[`E-medium`] issues are generally pretty easy too, though it's recommended you work on an [`good first issue`]
7474
first. Sometimes they are only somewhat involved code wise, but not difficult per-se.
7575
Note that [`E-medium`] issues may require some knowledge of Clippy internals or some
7676
debugging to find the actual problem behind the issue.
@@ -79,7 +79,7 @@ debugging to find the actual problem behind the issue.
7979
lot of methods that are useful, though one of the most useful would be `expr_ty` (gives the type of
8080
an AST expression).
8181

82-
[`good-first-issue`]: https://github.com/rust-lang/rust-clippy/labels/good-first-issue
82+
[`good first issue`]: https://github.com/rust-lang/rust-clippy/labels/good%20first%20issue
8383
[`S-inactive-closed`]: https://github.com/rust-lang/rust-clippy/pulls?q=is%3Aclosed+label%3AS-inactive-closed
8484
[`T-AST`]: https://github.com/rust-lang/rust-clippy/labels/T-AST
8585
[`T-middle`]: https://github.com/rust-lang/rust-clippy/labels/T-middle

Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
[package]
22
name = "clippy"
3-
# begin autogenerated version
43
version = "0.1.89"
5-
# end autogenerated version
64
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
75
repository = "https://github.com/rust-lang/rust-clippy"
86
readme = "README.md"
@@ -44,7 +42,7 @@ walkdir = "2.3"
4442
filetime = "0.2.9"
4543
itertools = "0.12"
4644
pulldown-cmark = { version = "0.11", default-features = false, features = ["html"] }
47-
askama = { version = "0.13", default-features = false, features = ["alloc", "config", "derive"] }
45+
askama = { version = "0.14", default-features = false, features = ["alloc", "config", "derive"] }
4846

4947
# UI test dependencies
5048
if_chain = "1.0"

book/src/development/basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ toolchain called `clippy` by default, see `cargo dev setup toolchain --help`
151151
for other options.
152152

153153
```terminal
154-
cargo dev setup toolcahin
154+
cargo dev setup toolchain
155155
```
156156

157157
Now you may run `cargo +clippy clippy` in any project using the new toolchain.

book/src/development/the_team.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ this group to help with triaging, which can include:
3333

3434
1. **Labeling issues**
3535

36-
For the `good-first-issue` label, it can still be good to use `@rustbot` to
36+
For the `good first issue` label, it can still be good to use `@rustbot` to
3737
subscribe to the issue and help interested parties, if they post questions
3838
in the comments.
3939

book/src/development/trait_checking.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ providing the `LateContext` (`cx`), our expression at hand, and
1717
the symbol of the trait in question:
1818

1919
```rust
20-
use clippy_utils::is_trait_method;
20+
use clippy_utils::ty::implements_trait;
2121
use rustc_hir::Expr;
2222
use rustc_lint::{LateContext, LateLintPass};
2323
use rustc_span::symbol::sym;
2424

2525
impl LateLintPass<'_> for CheckIteratorTraitLint {
2626
fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) {
2727
let implements_iterator = cx.tcx.get_diagnostic_item(sym::Iterator).map_or(false, |id| {
28-
implements_trait(cx, cx.typeck_results().expr_ty(arg), id, &[])
28+
implements_trait(cx, cx.typeck_results().expr_ty(expr), id, &[])
2929
});
3030
if implements_iterator {
3131
// [...]

book/src/lint_configuration.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,7 @@ The minimum rust version that the project supports. Defaults to the `rust-versio
836836
* [`manual_repeat_n`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n)
837837
* [`manual_retain`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain)
838838
* [`manual_slice_fill`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_fill)
839+
* [`manual_slice_size_calculation`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation)
839840
* [`manual_split_once`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_split_once)
840841
* [`manual_str_repeat`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_str_repeat)
841842
* [`manual_strip`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip)
@@ -1025,7 +1026,7 @@ The order of associated items in traits.
10251026
The maximum size (in bytes) to consider a `Copy` type for passing by value instead of by
10261027
reference.
10271028

1028-
**Default Value:** `target_pointer_width * 2`
1029+
**Default Value:** `target_pointer_width`
10291030

10301031
---
10311032
**Affected lints:**

clippy_config/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
[package]
22
name = "clippy_config"
3-
# begin autogenerated version
43
version = "0.1.89"
5-
# end autogenerated version
64
edition = "2024"
75
publish = false
86

clippy_config/src/conf.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,7 @@ define_Conf! {
739739
manual_repeat_n,
740740
manual_retain,
741741
manual_slice_fill,
742+
manual_slice_size_calculation,
742743
manual_split_once,
743744
manual_str_repeat,
744745
manual_strip,
@@ -827,7 +828,7 @@ define_Conf! {
827828
trait_assoc_item_kinds_order: SourceItemOrderingTraitAssocItemKinds = DEFAULT_TRAIT_ASSOC_ITEM_KINDS_ORDER.into(),
828829
/// The maximum size (in bytes) to consider a `Copy` type for passing by value instead of by
829830
/// reference.
830-
#[default_text = "target_pointer_width * 2"]
831+
#[default_text = "target_pointer_width"]
831832
#[lints(trivially_copy_pass_by_ref)]
832833
trivial_copy_size_limit: Option<u64> = None,
833834
/// The maximum complexity a type can have

clippy_dev/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ version = "0.0.1"
55
edition = "2024"
66

77
[dependencies]
8-
aho-corasick = "1.0"
98
chrono = { version = "0.4.38", default-features = false, features = ["clock"] }
109
clap = { version = "4.4", features = ["derive"] }
1110
indoc = "1.0"
1211
itertools = "0.12"
1312
opener = "0.7"
14-
shell-escape = "0.1"
1513
walkdir = "2.3"
1614

1715
[package.metadata.rust-analyzer]

0 commit comments

Comments
 (0)