Skip to content

Commit

Permalink
Add a note about avoiding default implemenations in some places
Browse files Browse the repository at this point in the history
Link: #707
  • Loading branch information
tgross35 committed Oct 6, 2024
1 parent 727e350 commit 87077a9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/int/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ pub(crate) trait HInt: Int {
/// Integer that is double the bit width of the integer this trait is implemented for
type D: DInt<H = Self> + MinInt;

// NB: some of the below methods could have default implementations (e.g. `widen_hi`), but for
// unknown reasons this can cause infinite recursion when optimizations are disabled. See
// <https://github.com/rust-lang/compiler-builtins/pull/707> for context.

/// Widens (using default extension) the integer to have double bit width
fn widen(self) -> Self::D;
/// Widens (zero extension only) the integer to have double bit width. This is needed to get
Expand Down

0 comments on commit 87077a9

Please sign in to comment.