@@ -603,8 +603,8 @@ pub const fn must_use<T>(value: T) -> T {
603
603
///
604
604
/// It can be used with `if` or boolean `match` expressions.
605
605
///
606
- /// When used outside of a branch condition, it may still work if there is a branch close by , but
607
- /// it is not guaranteed to have any effect.
606
+ /// When used outside of a branch condition, it may still influence a nearby branch , but
607
+ /// probably will not have any effect.
608
608
///
609
609
/// It can also be applied to parts of expressions, such as `likely(a) && unlikely(b)`, or to
610
610
/// compound expressions, such as `likely(a && b)`. When applied to compound expressions, it has
@@ -635,8 +635,7 @@ pub const fn must_use<T>(value: T) -> T {
635
635
/// false => println!("this branch is unlikely to be taken"),
636
636
/// }
637
637
///
638
- /// // Use outside of a branch condition. This may still work if there is a branch close by,
639
- /// // but it is not guaranteed to have any effect
638
+ /// // Use outside of a branch condition may still influence a nearby branch
640
639
/// let cond = likely(x != 0);
641
640
/// if cond {
642
641
/// println!("this branch is likely to be taken");
@@ -646,7 +645,6 @@ pub const fn must_use<T>(value: T) -> T {
646
645
///
647
646
///
648
647
#[ unstable( feature = "likely_unlikely" , issue = "26179" ) ]
649
- #[ rustc_nounwind]
650
648
#[ inline( always) ]
651
649
pub const fn likely ( b : bool ) -> bool {
652
650
crate :: intrinsics:: likely ( b)
@@ -657,8 +655,8 @@ pub const fn likely(b: bool) -> bool {
657
655
///
658
656
/// It can be used with `if` or boolean `match` expressions.
659
657
///
660
- /// When used outside of a branch condition, it may still work if there is a branch close by , but
661
- /// it is not guaranteed to have any effect.
658
+ /// When used outside of a branch condition, it may still influence a nearby branch , but
659
+ /// probably will not have any effect.
662
660
///
663
661
/// It can also be applied to parts of expressions, such as `likely(a) && unlikely(b)`, or to
664
662
/// compound expressions, such as `unlikely(a && b)`. When applied to compound expressions, it has
@@ -689,16 +687,14 @@ pub const fn likely(b: bool) -> bool {
689
687
/// false => println!("this branch is likely to be taken"),
690
688
/// }
691
689
///
692
- /// // Use outside of a branch condition. This may still work if there is a branch close by,
693
- /// // but it is not guaranteed to have any effect
690
+ /// // Use outside of a branch condition may still influence a nearby branch
694
691
/// let cond = unlikely(x != 0);
695
692
/// if cond {
696
693
/// println!("this branch is likely to be taken");
697
694
/// }
698
695
/// }
699
696
/// ```
700
697
#[ unstable( feature = "likely_unlikely" , issue = "26179" ) ]
701
- #[ rustc_nounwind]
702
698
#[ inline( always) ]
703
699
pub const fn unlikely ( b : bool ) -> bool {
704
700
crate :: intrinsics:: unlikely ( b)
@@ -732,7 +728,6 @@ pub const fn unlikely(b: bool) -> bool {
732
728
/// }
733
729
/// ```
734
730
#[ unstable( feature = "cold_path" , issue = "26179" ) ]
735
- #[ rustc_nounwind]
736
731
#[ inline( always) ]
737
732
pub const fn cold_path ( ) {
738
733
crate :: intrinsics:: cold_path ( )
0 commit comments