Skip to content

Commit

Permalink
Rollup merge of #119595 - mbbill:patch-1, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Fixed ambiguity in hint.rs

Needle and haystack are actually not the same, they remain constant.
  • Loading branch information
matthiaskrgr authored Jan 6, 2024
2 parents 909f2b6 + fdf9383 commit cda0d08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/hint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cda0d08

Please sign in to comment.