@@ -372,6 +372,8 @@ macro_rules! int_impl {
372372 ///
373373 /// On big endian this is a no-op. On little endian the bytes are swapped.
374374 ///
375+ /// See also [from_be_bytes()](Self::from_be_bytes).
376+ ///
375377 /// # Examples
376378 ///
377379 /// ```
@@ -402,6 +404,8 @@ macro_rules! int_impl {
402404 ///
403405 /// On little endian this is a no-op. On big endian the bytes are swapped.
404406 ///
407+ /// See also [from_le_bytes()](Self::from_le_bytes).
408+ ///
405409 /// # Examples
406410 ///
407411 /// ```
@@ -428,9 +432,15 @@ macro_rules! int_impl {
428432 }
429433 }
430434
431- /// Converts `self` to big endian from the target's endianness .
435+ /// Swaps bytes of `self` on little endian targets .
432436 ///
433- /// On big endian this is a no-op. On little endian the bytes are swapped.
437+ /// On big endian this is a no-op.
438+ ///
439+ /// The returned value has the same type as `self`, and will be interpreted
440+ /// as (a potentially different) value of a native-endian
441+ #[ doc = concat!( "`" , stringify!( $SelfT) , "`." ) ]
442+ ///
443+ /// See [`to_be_bytes()`](Self::to_be_bytes) for a type-safe alternative.
434444 ///
435445 /// # Examples
436446 ///
@@ -459,9 +469,15 @@ macro_rules! int_impl {
459469 }
460470 }
461471
462- /// Converts `self` to little endian from the target's endianness .
472+ /// Swaps bytes of `self` on big endian targets .
463473 ///
464- /// On little endian this is a no-op. On big endian the bytes are swapped.
474+ /// On little endian this is a no-op.
475+ ///
476+ /// The returned value has the same type as `self`, and will be interpreted
477+ /// as (a potentially different) value of a native-endian
478+ #[ doc = concat!( "`" , stringify!( $SelfT) , "`." ) ]
479+ ///
480+ /// See [`to_le_bytes()`](Self::to_le_bytes) for a type-safe alternative.
465481 ///
466482 /// # Examples
467483 ///
0 commit comments