@@ -517,8 +517,8 @@ pub const fn must_use<T>(value: T) -> T {
517
517
///
518
518
/// It can be used with `if` or boolean `match` expressions.
519
519
///
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.
522
522
///
523
523
/// It can also be applied to parts of expressions, such as `likely(a) && unlikely(b)`, or to
524
524
/// 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 {
549
549
/// false => println!("this branch is unlikely to be taken"),
550
550
/// }
551
551
///
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
554
553
/// let cond = likely(x != 0);
555
554
/// if cond {
556
555
/// println!("this branch is likely to be taken");
@@ -560,7 +559,6 @@ pub const fn must_use<T>(value: T) -> T {
560
559
///
561
560
///
562
561
#[ unstable( feature = "likely_unlikely" , issue = "26179" ) ]
563
- #[ rustc_nounwind]
564
562
#[ inline( always) ]
565
563
pub const fn likely ( b : bool ) -> bool {
566
564
crate :: intrinsics:: likely ( b)
@@ -571,8 +569,8 @@ pub const fn likely(b: bool) -> bool {
571
569
///
572
570
/// It can be used with `if` or boolean `match` expressions.
573
571
///
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.
576
574
///
577
575
/// It can also be applied to parts of expressions, such as `likely(a) && unlikely(b)`, or to
578
576
/// 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 {
603
601
/// false => println!("this branch is likely to be taken"),
604
602
/// }
605
603
///
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
608
605
/// let cond = unlikely(x != 0);
609
606
/// if cond {
610
607
/// println!("this branch is likely to be taken");
611
608
/// }
612
609
/// }
613
610
/// ```
614
611
#[ unstable( feature = "likely_unlikely" , issue = "26179" ) ]
615
- #[ rustc_nounwind]
616
612
#[ inline( always) ]
617
613
pub const fn unlikely ( b : bool ) -> bool {
618
614
crate :: intrinsics:: unlikely ( b)
@@ -646,7 +642,6 @@ pub const fn unlikely(b: bool) -> bool {
646
642
/// }
647
643
/// ```
648
644
#[ unstable( feature = "cold_path" , issue = "26179" ) ]
649
- #[ rustc_nounwind]
650
645
#[ inline( always) ]
651
646
pub const fn cold_path ( ) {
652
647
crate :: intrinsics:: cold_path ( )
0 commit comments