@@ -517,8 +517,8 @@ pub const fn must_use<T>(value: T) -> T {
517517///
518518/// It can be used with `if` or boolean `match` expressions.
519519///
520- /// When used outside of a branch condition, it may still work if there is a branch close by , but
521- /// it is not guaranteed to have any effect.
520+ /// When used outside of a branch condition, it may still influence a nearby branch , but
521+ /// probably will not have any effect.
522522///
523523/// It can also be applied to parts of expressions, such as `likely(a) && unlikely(b)`, or to
524524/// compound expressions, such as `likely(a && b)`. When applied to compound expressions, it has
@@ -549,8 +549,7 @@ pub const fn must_use<T>(value: T) -> T {
549549/// false => println!("this branch is unlikely to be taken"),
550550/// }
551551///
552- /// // Use outside of a branch condition. This may still work if there is a branch close by,
553- /// // but it is not guaranteed to have any effect
552+ /// // Use outside of a branch condition may still influence a nearby branch
554553/// let cond = likely(x != 0);
555554/// if cond {
556555/// println!("this branch is likely to be taken");
@@ -560,7 +559,6 @@ pub const fn must_use<T>(value: T) -> T {
560559///
561560///
562561#[ unstable( feature = "likely_unlikely" , issue = "26179" ) ]
563- #[ rustc_nounwind]
564562#[ inline( always) ]
565563pub const fn likely ( b : bool ) -> bool {
566564 crate :: intrinsics:: likely ( b)
@@ -571,8 +569,8 @@ pub const fn likely(b: bool) -> bool {
571569///
572570/// It can be used with `if` or boolean `match` expressions.
573571///
574- /// When used outside of a branch condition, it may still work if there is a branch close by , but
575- /// it is not guaranteed to have any effect.
572+ /// When used outside of a branch condition, it may still influence a nearby branch , but
573+ /// probably will not have any effect.
576574///
577575/// It can also be applied to parts of expressions, such as `likely(a) && unlikely(b)`, or to
578576/// compound expressions, such as `unlikely(a && b)`. When applied to compound expressions, it has
@@ -603,16 +601,14 @@ pub const fn likely(b: bool) -> bool {
603601/// false => println!("this branch is likely to be taken"),
604602/// }
605603///
606- /// // Use outside of a branch condition. This may still work if there is a branch close by,
607- /// // but it is not guaranteed to have any effect
604+ /// // Use outside of a branch condition may still influence a nearby branch
608605/// let cond = unlikely(x != 0);
609606/// if cond {
610607/// println!("this branch is likely to be taken");
611608/// }
612609/// }
613610/// ```
614611#[ unstable( feature = "likely_unlikely" , issue = "26179" ) ]
615- #[ rustc_nounwind]
616612#[ inline( always) ]
617613pub const fn unlikely ( b : bool ) -> bool {
618614 crate :: intrinsics:: unlikely ( b)
@@ -646,7 +642,6 @@ pub const fn unlikely(b: bool) -> bool {
646642/// }
647643/// ```
648644#[ unstable( feature = "cold_path" , issue = "26179" ) ]
649- #[ rustc_nounwind]
650645#[ inline( always) ]
651646pub const fn cold_path ( ) {
652647 crate :: intrinsics:: cold_path ( )
0 commit comments