Skip to content

Commit 87077a9

Browse files
committed
Add a note about avoiding default implemenations in some places
Link: #707
1 parent 727e350 commit 87077a9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: src/int/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,10 @@ pub(crate) trait HInt: Int {
313313
/// Integer that is double the bit width of the integer this trait is implemented for
314314
type D: DInt<H = Self> + MinInt;
315315

316+
// NB: some of the below methods could have default implementations (e.g. `widen_hi`), but for
317+
// unknown reasons this can cause infinite recursion when optimizations are disabled. See
318+
// <https://github.com/rust-lang/compiler-builtins/pull/707> for context.
319+
316320
/// Widens (using default extension) the integer to have double bit width
317321
fn widen(self) -> Self::D;
318322
/// Widens (zero extension only) the integer to have double bit width. This is needed to get

0 commit comments

Comments
 (0)