You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
interface I {
let T:! type;
default fn F() -> T;
}
fn I.F() -> T {
class C {
// `I` is complete, but `I.F`'s default
// value is still being defined.
impl as I where .T = i32 {}
}
}
If the default definition of I.F is eveer used, it will lead to an infinite instantiation loop. This is because forming the specific for a given type U will trigger creation of a new class C(U), which itself has an impl of I that uses the default value of I.F.
We should apply the termination check to formation of specifics to detect this problem, since each instantiation is strictly more complex.
The text was updated successfully, but these errors were encountered:
In this example:
If the default definition of
I.F
is eveer used, it will lead to an infinite instantiation loop. This is because forming the specific for a given typeU
will trigger creation of a new classC(U)
, which itself has an impl ofI
that uses the default value ofI.F
.We should apply the termination check to formation of specifics to detect this problem, since each instantiation is strictly more complex.
The text was updated successfully, but these errors were encountered: