@@ -467,49 +467,46 @@ pub trait CheckedSub<Rhs = Self>: Sized {
467467 fn checked_sub ( & self , rhs : & Rhs ) -> CtOption < Self > ;
468468}
469469
470- /// Concatenate two numbers into a "wide" double-width value, using the `lo`
471- /// value as the least significant value.
470+ /// Concatenate two numbers into a "wide" double-width value, using the `hi` value as the most
471+ /// significant portion of the resulting value.
472472pub trait Concat : ConcatMixed < Self , MixedOutput = Self :: Output > {
473473 /// Concatenated output: twice the width of `Self`.
474474 type Output : Integer ;
475475
476- /// Concatenate the two halves, with `self` as most significant and `lo`
477- /// as the least significant.
478- fn concat ( & self , lo : & Self ) -> Self :: Output {
479- self . concat_mixed ( lo )
476+ /// Concatenate the two halves, with `self` as least significant and `hi` as the least
477+ /// significant.
478+ fn concat ( & self , hi : & Self ) -> Self :: Output {
479+ self . concat_mixed ( hi )
480480 }
481481}
482482
483- /// Concatenate two numbers into a "wide" combined-width value, using the `lo`
484- /// value as the least significant value.
485- pub trait ConcatMixed < Lo : ?Sized = Self > {
486- /// Concatenated output: combination of `Lo ` and `Self `.
483+ /// Concatenate two numbers into a "wide" combined-width value, using the `hi` value as the most
484+ /// significant value.
485+ pub trait ConcatMixed < Hi : ?Sized = Self > {
486+ /// Concatenated output: combination of `Self ` and `Hi `.
487487 type MixedOutput : Integer ;
488488
489- /// Concatenate the two values, with `self` as most significant and `lo`
490- /// as the least significant.
491- fn concat_mixed ( & self , lo : & Lo ) -> Self :: MixedOutput ;
489+ /// Concatenate the two values, with `self` as least significant and `hi` as the most
490+ /// significant.
491+ fn concat_mixed ( & self , hi : & Hi ) -> Self :: MixedOutput ;
492492}
493493
494- /// Split a number in half, returning the most significant half followed by
495- /// the least significant.
494+ /// Split a number in half, returning the least significant half followed by the most significant.
496495pub trait Split : SplitMixed < Self :: Output , Self :: Output > {
497- /// Split output: high/ low components of the value.
496+ /// Split output: low/high components of the value.
498497 type Output ;
499498
500- /// Split this number in half, returning its high and low components
501- /// respectively.
499+ /// Split this number in half, returning its low and high components respectively.
502500 fn split ( & self ) -> ( Self :: Output , Self :: Output ) {
503501 self . split_mixed ( )
504502 }
505503}
506504
507- /// Split a number into parts, returning the most significant part followed by
508- /// the least significant.
509- pub trait SplitMixed < Hi , Lo > {
510- /// Split this number into parts, returning its high and low components
511- /// respectively.
512- fn split_mixed ( & self ) -> ( Hi , Lo ) ;
505+ /// Split a number into parts, returning the least significant part followed by the most
506+ /// significant.
507+ pub trait SplitMixed < Lo , Hi > {
508+ /// Split this number into parts, returning its low and high components respectively.
509+ fn split_mixed ( & self ) -> ( Lo , Hi ) ;
513510}
514511
515512/// Encoding support.
0 commit comments