Skip to content

Commit 75cde9b

Browse files
authored
Rollup merge of #164374 - ojeda:likely-typo, r=hanna-kruppe
core: hint: fix `unlikely`'s example polarity typo The line did not seem to get updated when the example was likely copy-pasted from the `likely()` one. Thus fix it.
2 parents acd1d17 + ec9a248 commit 75cde9b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎library/core/src/hint.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ pub const fn likely(b: bool) -> bool {
704704
/// // Use outside of a branch condition may still influence a nearby branch
705705
/// let cond = unlikely(x != 0);
706706
/// if cond {
707-
/// println!("this branch is likely to be taken");
707+
/// println!("this branch is unlikely to be taken");
708708
/// }
709709
/// }
710710
/// ```

0 commit comments

Comments
 (0)