Skip to content

Commit 980cf08

Browse files
committed
Auto merge of rust-lang#120920 - matthiaskrgr:rollup-jsryr8e, r=matthiaskrgr
Rollup of 10 pull requests Successful merges: - rust-lang#117740 (Add some links and minor explanatory comments to `std::fmt`) - rust-lang#118307 (Remove an unneeded helper from the tuple library code) - rust-lang#119242 (Suggest less bug-prone construction of Duration in docs) - rust-lang#119449 (Fix `clippy::correctness` in the library) - rust-lang#120307 (core: add Duration constructors) - rust-lang#120459 (Document various I/O descriptor/handle conversions) - rust-lang#120729 (Update mdbook to 0.4.37) - rust-lang#120763 (Suggest pattern tests when modifying exhaustiveness) - rust-lang#120906 (Remove myself from some review rotations) - rust-lang#120916 (Subtree update of ` rust-analyzer`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 899c895 + 3ac0872 commit 980cf08

File tree

409 files changed

+15222
-3275
lines changed

Some content is hidden

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

409 files changed

+15222
-3275
lines changed

Cargo.lock

+81-16
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,21 @@ dependencies = [
147147
"anstyle",
148148
"anstyle-parse",
149149
"anstyle-query",
150-
"anstyle-wincon",
150+
"anstyle-wincon 2.1.0",
151+
"colorchoice",
152+
"utf8parse",
153+
]
154+
155+
[[package]]
156+
name = "anstream"
157+
version = "0.6.11"
158+
source = "registry+https://github.com/rust-lang/crates.io-index"
159+
checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5"
160+
dependencies = [
161+
"anstyle",
162+
"anstyle-parse",
163+
"anstyle-query",
164+
"anstyle-wincon 3.0.2",
151165
"colorchoice",
152166
"utf8parse",
153167
]
@@ -186,6 +200,16 @@ dependencies = [
186200
"windows-sys 0.48.0",
187201
]
188202

203+
[[package]]
204+
name = "anstyle-wincon"
205+
version = "3.0.2"
206+
source = "registry+https://github.com/rust-lang/crates.io-index"
207+
checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7"
208+
dependencies = [
209+
"anstyle",
210+
"windows-sys 0.52.0",
211+
]
212+
189213
[[package]]
190214
name = "anyhow"
191215
version = "1.0.75"
@@ -520,7 +544,7 @@ version = "4.4.4"
520544
source = "registry+https://github.com/rust-lang/crates.io-index"
521545
checksum = "5179bb514e4d7c2051749d8fcefa2ed6d06a9f4e6d69faf3805f5d80b8cf8d56"
522546
dependencies = [
523-
"anstream",
547+
"anstream 0.5.0",
524548
"anstyle",
525549
"clap_lex",
526550
"strsim",
@@ -558,7 +582,7 @@ checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b"
558582
name = "clippy"
559583
version = "0.1.78"
560584
dependencies = [
561-
"anstream",
585+
"anstream 0.5.0",
562586
"clippy_config",
563587
"clippy_lints",
564588
"clippy_utils",
@@ -1234,6 +1258,16 @@ dependencies = [
12341258
"cfg-if",
12351259
]
12361260

1261+
[[package]]
1262+
name = "env_filter"
1263+
version = "0.1.0"
1264+
source = "registry+https://github.com/rust-lang/crates.io-index"
1265+
checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea"
1266+
dependencies = [
1267+
"log",
1268+
"regex",
1269+
]
1270+
12371271
[[package]]
12381272
name = "env_logger"
12391273
version = "0.10.0"
@@ -1247,6 +1281,19 @@ dependencies = [
12471281
"termcolor",
12481282
]
12491283

1284+
[[package]]
1285+
name = "env_logger"
1286+
version = "0.11.1"
1287+
source = "registry+https://github.com/rust-lang/crates.io-index"
1288+
checksum = "05e7cf40684ae96ade6232ed84582f40ce0a66efcd43a5117aef610534f8e0b8"
1289+
dependencies = [
1290+
"anstream 0.6.11",
1291+
"anstyle",
1292+
"env_filter",
1293+
"humantime",
1294+
"log",
1295+
]
1296+
12501297
[[package]]
12511298
name = "equivalent"
12521299
version = "1.0.0"
@@ -1638,9 +1685,9 @@ dependencies = [
16381685

16391686
[[package]]
16401687
name = "handlebars"
1641-
version = "4.3.7"
1688+
version = "5.1.0"
16421689
source = "registry+https://github.com/rust-lang/crates.io-index"
1643-
checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d"
1690+
checksum = "ab283476b99e66691dee3f1640fea91487a8d81f50fb5ecc75538f8f8879a1e4"
16441691
dependencies = [
16451692
"log",
16461693
"pest",
@@ -2227,6 +2274,7 @@ dependencies = [
22272274
name = "linkchecker"
22282275
version = "0.1.0"
22292276
dependencies = [
2277+
"html5ever",
22302278
"once_cell",
22312279
"regex",
22322280
]
@@ -2335,24 +2383,23 @@ dependencies = [
23352383

23362384
[[package]]
23372385
name = "mdbook"
2338-
version = "0.4.36"
2386+
version = "0.4.37"
23392387
source = "registry+https://github.com/rust-lang/crates.io-index"
2340-
checksum = "80992cb0e05f22cc052c99f8e883f1593b891014b96a8b4637fd274d7030c85e"
2388+
checksum = "0c33564061c3c640bed5ace7d6a2a1b65f2c64257d1ac930c15e94ed0fb561d3"
23412389
dependencies = [
23422390
"ammonia",
23432391
"anyhow",
23442392
"chrono",
23452393
"clap",
23462394
"clap_complete",
23472395
"elasticlunr-rs",
2348-
"env_logger",
2396+
"env_logger 0.11.1",
23492397
"handlebars",
23502398
"log",
23512399
"memchr",
23522400
"once_cell",
23532401
"opener",
2354-
"pathdiff",
2355-
"pulldown-cmark",
2402+
"pulldown-cmark 0.10.0",
23562403
"regex",
23572404
"serde",
23582405
"serde_json",
@@ -2471,7 +2518,7 @@ dependencies = [
24712518
"aes",
24722519
"colored",
24732520
"ctrlc",
2474-
"env_logger",
2521+
"env_logger 0.10.0",
24752522
"getrandom",
24762523
"jemalloc-sys",
24772524
"lazy_static",
@@ -2689,7 +2736,7 @@ dependencies = [
26892736
"camino",
26902737
"clap",
26912738
"derive_builder",
2692-
"env_logger",
2739+
"env_logger 0.10.0",
26932740
"fs_extra",
26942741
"glob",
26952742
"humansize",
@@ -3012,6 +3059,24 @@ dependencies = [
30123059
"unicase",
30133060
]
30143061

3062+
[[package]]
3063+
name = "pulldown-cmark"
3064+
version = "0.10.0"
3065+
source = "registry+https://github.com/rust-lang/crates.io-index"
3066+
checksum = "dce76ce678ffc8e5675b22aa1405de0b7037e2fdf8913fea40d1926c6fe1e6e7"
3067+
dependencies = [
3068+
"bitflags 2.4.1",
3069+
"memchr",
3070+
"pulldown-cmark-escape",
3071+
"unicase",
3072+
]
3073+
3074+
[[package]]
3075+
name = "pulldown-cmark-escape"
3076+
version = "0.10.0"
3077+
source = "registry+https://github.com/rust-lang/crates.io-index"
3078+
checksum = "d5d8f9aa0e3cbcfaf8bf00300004ee3b72f74770f9cbac93f6928771f613276b"
3079+
30153080
[[package]]
30163081
name = "punycode"
30173082
version = "0.4.1"
@@ -3271,7 +3336,7 @@ name = "rustbook"
32713336
version = "0.1.0"
32723337
dependencies = [
32733338
"clap",
3274-
"env_logger",
3339+
"env_logger 0.10.0",
32753340
"mdbook",
32763341
]
32773342

@@ -4427,7 +4492,7 @@ name = "rustc_resolve"
44274492
version = "0.0.0"
44284493
dependencies = [
44294494
"bitflags 2.4.1",
4430-
"pulldown-cmark",
4495+
"pulldown-cmark 0.9.6",
44314496
"rustc_arena",
44324497
"rustc_ast",
44334498
"rustc_ast_pretty",
@@ -4971,9 +5036,9 @@ checksum = "45bb67a18fa91266cc7807181f62f9178a6873bfad7dc788c42e6430db40184f"
49715036

49725037
[[package]]
49735038
name = "shlex"
4974-
version = "1.1.0"
5039+
version = "1.3.0"
49755040
source = "registry+https://github.com/rust-lang/crates.io-index"
4976-
checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
5041+
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
49775042

49785043
[[package]]
49795044
name = "siphasher"

library/alloc/src/fmt.rs

+5
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@
188188
//! * `#X` - precedes the argument with a `0x`
189189
//! * `#b` - precedes the argument with a `0b`
190190
//! * `#o` - precedes the argument with a `0o`
191+
//!
192+
//! See [Formatting traits](#formatting-traits) for a description of what the `?`, `x`, `X`,
193+
//! `b`, and `o` flags do.
194+
//!
191195
//! * `0` - This is used to indicate for integer formats that the padding to `width` should
192196
//! both be done with a `0` character as well as be sign-aware. A format
193197
//! like `{:08}` would yield `00000001` for the integer `1`, while the
@@ -197,6 +201,7 @@
197201
//! and before the digits. When used together with the `#` flag, a similar
198202
//! rule applies: padding zeros are inserted after the prefix but before
199203
//! the digits. The prefix is included in the total width.
204+
//! This flag overrides the [fill character and alignment flag](#fillalignment).
200205
//!
201206
//! ## Precision
202207
//!

library/core/src/ffi/c_str.rs

+1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ use crate::str;
8888
// want `repr(transparent)` but we don't want it to show up in rustdoc, so we hide it under
8989
// `cfg(doc)`. This is an ad-hoc implementation of attribute privacy.
9090
#[cfg_attr(not(doc), repr(transparent))]
91+
#[allow(clippy::derived_hash_with_manual_eq)]
9192
pub struct CStr {
9293
// FIXME: this should not be represented with a DST slice but rather with
9394
// just a raw `c_char` along with some form of marker to make

library/core/src/num/f32.rs

+2
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ impl f32 {
462462
/// and target platforms isn't guaranteed.
463463
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
464464
#[rustc_diagnostic_item = "f32_nan"]
465+
#[allow(clippy::eq_op)]
465466
pub const NAN: f32 = 0.0_f32 / 0.0_f32;
466467
/// Infinity (∞).
467468
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
@@ -483,6 +484,7 @@ impl f32 {
483484
#[stable(feature = "rust1", since = "1.0.0")]
484485
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
485486
#[inline]
487+
#[allow(clippy::eq_op)] // > if you intended to check if the operand is NaN, use `.is_nan()` instead :)
486488
pub const fn is_nan(self) -> bool {
487489
self != self
488490
}

library/core/src/num/f64.rs

+2
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,7 @@ impl f64 {
461461
/// and target platforms isn't guaranteed.
462462
#[rustc_diagnostic_item = "f64_nan"]
463463
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
464+
#[allow(clippy::eq_op)]
464465
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
465466
/// Infinity (∞).
466467
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
@@ -482,6 +483,7 @@ impl f64 {
482483
#[stable(feature = "rust1", since = "1.0.0")]
483484
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
484485
#[inline]
486+
#[allow(clippy::eq_op)] // > if you intended to check if the operand is NaN, use `.is_nan()` instead :)
485487
pub const fn is_nan(self) -> bool {
486488
self != self
487489
}

library/core/src/option.rs

+1
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,7 @@ use crate::{
567567
#[rustc_diagnostic_item = "Option"]
568568
#[lang = "Option"]
569569
#[stable(feature = "rust1", since = "1.0.0")]
570+
#[allow(clippy::derived_hash_with_manual_eq)] // PartialEq is specialized
570571
pub enum Option<T> {
571572
/// No value.
572573
#[lang = "None"]

library/core/src/ptr/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,8 @@
376376
//! [Stacked Borrows]: https://plv.mpi-sws.org/rustbelt/stacked-borrows/
377377
378378
#![stable(feature = "rust1", since = "1.0.0")]
379+
// There are many unsafe functions taking pointers that don't dereference them.
380+
#![allow(clippy::not_unsafe_ptr_arg_deref)]
379381

380382
use crate::cmp::Ordering;
381383
use crate::fmt;

library/core/src/sync/atomic.rs

+4
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@
216216
#![cfg_attr(not(target_has_atomic_load_store = "8"), allow(dead_code))]
217217
#![cfg_attr(not(target_has_atomic_load_store = "8"), allow(unused_imports))]
218218
#![rustc_diagnostic_item = "atomic_mod"]
219+
// Clippy complains about the pattern of "safe function calling unsafe function taking pointers".
220+
// This happens with AtomicPtr intrinsics but is fine, as the pointers clippy is concerned about
221+
// are just normal values that get loaded/stored, but not dereferenced.
222+
#![allow(clippy::not_unsafe_ptr_arg_deref)]
219223

220224
use self::Ordering::*;
221225

0 commit comments

Comments
 (0)