From df8a1aa694dd5507e1a72962115162d460ce753d Mon Sep 17 00:00:00 2001 From: GHA CI Date: Sun, 1 Dec 2024 12:11:29 +0000 Subject: [PATCH] Automatic deploy to GitHub Pages: 1f966e98db0c83fc76657fbc0bd50d11526787b1 --- master/index.html | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/master/index.html b/master/index.html index 7b857a4a1938..9da5791b1c1c 100644 --- a/master/index.html +++ b/master/index.html @@ -5776,7 +5776,22 @@

Example

pedantic = { level = "warn", priority = -1 } similar_names = "allow" -
Applicability: Unspecified(?)
Added in: 1.78.0

What it does

+
Applicability: Unspecified(?)
Added in: 1.78.0

What it does

+

Checks if string literals have formatting arguments outside of macros +using them (like format!).

+

Why is this bad?

+

It will likely not generate the expected content.

+

Example

+
let x: Option<usize> = None;
+let y = "hello";
+x.expect("{y:?}");
+
+

Use instead:

+
let x: Option<usize> = None;
+let y = "hello";
+x.expect(&format!("{y:?}"));
+
+
Applicability: Unspecified(?)
Added in: 1.83.0

What it does

Checks for the usage of the to_le_bytes method and/or the function from_le_bytes.

Why restrict this?

To ensure use of big-endian or the target’s endianness rather than little-endian.