Rollup merge of #119595 - mbbill:patch-1, r=Mark-Simulacrum

Fixed ambiguity in hint.rs

Needle and haystack are actually not the same, they remain constant.
This commit is contained in:
Matthias Krüger 2024-01-06 16:07:48 +01:00 committed by GitHub
commit cda0d08388
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -287,7 +287,7 @@ pub fn spin_loop() {
///
/// The compiler could theoretically make optimizations like the following:
///
/// - `needle` and `haystack` are always the same, move the call to `contains` outside the loop and
/// - The `needle` and `haystack` do not change, move the call to `contains` outside the loop and
/// delete the loop
/// - Inline `contains`
/// - `needle` and `haystack` have values known at compile time, `contains` is always true. Remove