<p><span class="h-card" translate="no"><a href="https://hachyderm.io/@fasterthanlime" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>fasterthanlime</span></a></span> I think you might be able to add such a constraint of you go the opposite way, i.e.</p><pre><code>trait FromLife: 'static + TypeEq&lt;This = &lt;Self as FromLife&gt;::Life&lt;'static&gt;&gt; {<br> type Life&lt;'a&gt;;<br><br> fn from_life(life: Self::Life&lt;'_&gt;) -&gt; Self;<br>}<br></code></pre><p><a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2021&amp;gist=1f270c914c46f66df814737d5d03af05" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="ellipsis">play.rust-lang.org/?version=st</span><span class="invisible">able&amp;mode=debug&amp;edition=2021&amp;gist=1f270c914c46f66df814737d5d03af05</span></a></p><p>No idea if this works for you.</p><p>But making it into a constraint on <code>IntoStatic</code> shouldn't be possible — you basically need to have <code>Self&lt;'static&gt; = Self::Output</code>, and there is no way to write <code>Self&lt;'static&gt;</code></p>
Reply