Skip to content

Commit

Permalink
Auto merge of rust-lang#120920 - matthiaskrgr:rollup-jsryr8e, r=matth…
Browse files Browse the repository at this point in the history
…iaskrgr

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
  • Loading branch information
bors committed Feb 11, 2024
2 parents 9aa232e + 3ac0872 commit eb5a0ed
Show file tree
Hide file tree
Showing 409 changed files with 15,222 additions and 3,275 deletions.
97 changes: 81 additions & 16 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,21 @@ dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"anstyle-wincon 2.1.0",
"colorchoice",
"utf8parse",
]

[[package]]
name = "anstream"
version = "0.6.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon 3.0.2",
"colorchoice",
"utf8parse",
]
Expand Down Expand Up @@ -186,6 +200,16 @@ dependencies = [
"windows-sys 0.48.0",
]

[[package]]
name = "anstyle-wincon"
version = "3.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7"
dependencies = [
"anstyle",
"windows-sys 0.52.0",
]

[[package]]
name = "anyhow"
version = "1.0.75"
Expand Down Expand Up @@ -520,7 +544,7 @@ version = "4.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5179bb514e4d7c2051749d8fcefa2ed6d06a9f4e6d69faf3805f5d80b8cf8d56"
dependencies = [
"anstream",
"anstream 0.5.0",
"anstyle",
"clap_lex",
"strsim",
Expand Down Expand Up @@ -558,7 +582,7 @@ checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b"
name = "clippy"
version = "0.1.78"
dependencies = [
"anstream",
"anstream 0.5.0",
"clippy_config",
"clippy_lints",
"clippy_utils",
Expand Down Expand Up @@ -1234,6 +1258,16 @@ dependencies = [
"cfg-if",
]

[[package]]
name = "env_filter"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea"
dependencies = [
"log",
"regex",
]

[[package]]
name = "env_logger"
version = "0.10.0"
Expand All @@ -1247,6 +1281,19 @@ dependencies = [
"termcolor",
]

[[package]]
name = "env_logger"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05e7cf40684ae96ade6232ed84582f40ce0a66efcd43a5117aef610534f8e0b8"
dependencies = [
"anstream 0.6.11",
"anstyle",
"env_filter",
"humantime",
"log",
]

[[package]]
name = "equivalent"
version = "1.0.0"
Expand Down Expand Up @@ -1638,9 +1685,9 @@ dependencies = [

[[package]]
name = "handlebars"
version = "4.3.7"
version = "5.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d"
checksum = "ab283476b99e66691dee3f1640fea91487a8d81f50fb5ecc75538f8f8879a1e4"
dependencies = [
"log",
"pest",
Expand Down Expand Up @@ -2227,6 +2274,7 @@ dependencies = [
name = "linkchecker"
version = "0.1.0"
dependencies = [
"html5ever",
"once_cell",
"regex",
]
Expand Down Expand Up @@ -2335,24 +2383,23 @@ dependencies = [

[[package]]
name = "mdbook"
version = "0.4.36"
version = "0.4.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80992cb0e05f22cc052c99f8e883f1593b891014b96a8b4637fd274d7030c85e"
checksum = "0c33564061c3c640bed5ace7d6a2a1b65f2c64257d1ac930c15e94ed0fb561d3"
dependencies = [
"ammonia",
"anyhow",
"chrono",
"clap",
"clap_complete",
"elasticlunr-rs",
"env_logger",
"env_logger 0.11.1",
"handlebars",
"log",
"memchr",
"once_cell",
"opener",
"pathdiff",
"pulldown-cmark",
"pulldown-cmark 0.10.0",
"regex",
"serde",
"serde_json",
Expand Down Expand Up @@ -2471,7 +2518,7 @@ dependencies = [
"aes",
"colored",
"ctrlc",
"env_logger",
"env_logger 0.10.0",
"getrandom",
"jemalloc-sys",
"lazy_static",
Expand Down Expand Up @@ -2689,7 +2736,7 @@ dependencies = [
"camino",
"clap",
"derive_builder",
"env_logger",
"env_logger 0.10.0",
"fs_extra",
"glob",
"humansize",
Expand Down Expand Up @@ -3012,6 +3059,24 @@ dependencies = [
"unicase",
]

[[package]]
name = "pulldown-cmark"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dce76ce678ffc8e5675b22aa1405de0b7037e2fdf8913fea40d1926c6fe1e6e7"
dependencies = [
"bitflags 2.4.1",
"memchr",
"pulldown-cmark-escape",
"unicase",
]

[[package]]
name = "pulldown-cmark-escape"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5d8f9aa0e3cbcfaf8bf00300004ee3b72f74770f9cbac93f6928771f613276b"

[[package]]
name = "punycode"
version = "0.4.1"
Expand Down Expand Up @@ -3271,7 +3336,7 @@ name = "rustbook"
version = "0.1.0"
dependencies = [
"clap",
"env_logger",
"env_logger 0.10.0",
"mdbook",
]

Expand Down Expand Up @@ -4427,7 +4492,7 @@ name = "rustc_resolve"
version = "0.0.0"
dependencies = [
"bitflags 2.4.1",
"pulldown-cmark",
"pulldown-cmark 0.9.6",
"rustc_arena",
"rustc_ast",
"rustc_ast_pretty",
Expand Down Expand Up @@ -4971,9 +5036,9 @@ checksum = "45bb67a18fa91266cc7807181f62f9178a6873bfad7dc788c42e6430db40184f"

[[package]]
name = "shlex"
version = "1.1.0"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"

[[package]]
name = "siphasher"
Expand Down
5 changes: 5 additions & 0 deletions library/alloc/src/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@
//! * `#X` - precedes the argument with a `0x`
//! * `#b` - precedes the argument with a `0b`
//! * `#o` - precedes the argument with a `0o`
//!
//! See [Formatting traits](#formatting-traits) for a description of what the `?`, `x`, `X`,
//! `b`, and `o` flags do.
//!
//! * `0` - This is used to indicate for integer formats that the padding to `width` should
//! both be done with a `0` character as well as be sign-aware. A format
//! like `{:08}` would yield `00000001` for the integer `1`, while the
Expand All @@ -197,6 +201,7 @@
//! and before the digits. When used together with the `#` flag, a similar
//! rule applies: padding zeros are inserted after the prefix but before
//! the digits. The prefix is included in the total width.
//! This flag overrides the [fill character and alignment flag](#fillalignment).
//!
//! ## Precision
//!
Expand Down
1 change: 1 addition & 0 deletions library/core/src/ffi/c_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ use crate::str;
// want `repr(transparent)` but we don't want it to show up in rustdoc, so we hide it under
// `cfg(doc)`. This is an ad-hoc implementation of attribute privacy.
#[cfg_attr(not(doc), repr(transparent))]
#[allow(clippy::derived_hash_with_manual_eq)]
pub struct CStr {
// FIXME: this should not be represented with a DST slice but rather with
// just a raw `c_char` along with some form of marker to make
Expand Down
2 changes: 2 additions & 0 deletions library/core/src/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ impl f32 {
/// and target platforms isn't guaranteed.
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
#[rustc_diagnostic_item = "f32_nan"]
#[allow(clippy::eq_op)]
pub const NAN: f32 = 0.0_f32 / 0.0_f32;
/// Infinity (∞).
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
Expand All @@ -483,6 +484,7 @@ impl f32 {
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
#[inline]
#[allow(clippy::eq_op)] // > if you intended to check if the operand is NaN, use `.is_nan()` instead :)
pub const fn is_nan(self) -> bool {
self != self
}
Expand Down
2 changes: 2 additions & 0 deletions library/core/src/num/f64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ impl f64 {
/// and target platforms isn't guaranteed.
#[rustc_diagnostic_item = "f64_nan"]
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
#[allow(clippy::eq_op)]
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
/// Infinity (∞).
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
Expand All @@ -482,6 +483,7 @@ impl f64 {
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
#[inline]
#[allow(clippy::eq_op)] // > if you intended to check if the operand is NaN, use `.is_nan()` instead :)
pub const fn is_nan(self) -> bool {
self != self
}
Expand Down
1 change: 1 addition & 0 deletions library/core/src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@ use crate::{
#[rustc_diagnostic_item = "Option"]
#[lang = "Option"]
#[stable(feature = "rust1", since = "1.0.0")]
#[allow(clippy::derived_hash_with_manual_eq)] // PartialEq is specialized
pub enum Option<T> {
/// No value.
#[lang = "None"]
Expand Down
2 changes: 2 additions & 0 deletions library/core/src/ptr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@
//! [Stacked Borrows]: https://plv.mpi-sws.org/rustbelt/stacked-borrows/

#![stable(feature = "rust1", since = "1.0.0")]
// There are many unsafe functions taking pointers that don't dereference them.
#![allow(clippy::not_unsafe_ptr_arg_deref)]

use crate::cmp::Ordering;
use crate::fmt;
Expand Down
4 changes: 4 additions & 0 deletions library/core/src/sync/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@
#![cfg_attr(not(target_has_atomic_load_store = "8"), allow(dead_code))]
#![cfg_attr(not(target_has_atomic_load_store = "8"), allow(unused_imports))]
#![rustc_diagnostic_item = "atomic_mod"]
// Clippy complains about the pattern of "safe function calling unsafe function taking pointers".
// This happens with AtomicPtr intrinsics but is fine, as the pointers clippy is concerned about
// are just normal values that get loaded/stored, but not dereferenced.
#![allow(clippy::not_unsafe_ptr_arg_deref)]

use self::Ordering::*;

Expand Down
Loading

0 comments on commit eb5a0ed

Please sign in to comment.