<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/ui/impl-trait/in-trait/missing-static-bound-from-impl.rs, branch try-perf</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=try-perf</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=try-perf'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-02-27T17:43:40+00:00</updated>
<entry>
<title>Print RPITIT like an opaque</title>
<updated>2024-02-27T17:43:40+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-02-27T16:11:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b57ddfe079cbd9974f0b1f68a50f8f1b901cfdaf'/>
<id>urn:sha1:b57ddfe079cbd9974f0b1f68a50f8f1b901cfdaf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Account for RPITIT in E0310 explicit lifetime constraint suggestion</title>
<updated>2024-02-22T18:56:07+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-02-22T06:15:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5e6da720f621308a0f44e7c6bbd13a9fad68b240'/>
<id>urn:sha1:5e6da720f621308a0f44e7c6bbd13a9fad68b240</id>
<content type='text'>
When given

```rust
trait Original {
    fn f() -&gt; impl Fn();
}

trait Erased {
    fn f(&amp;self) -&gt; Box&lt;dyn Fn()&gt;;
}

impl&lt;T: Original&gt; Erased for T {
    fn f(&amp;self) -&gt; Box&lt;dyn Fn()&gt; {
        Box::new(&lt;T as Original&gt;::f())
    }
}
```

avoid suggestion to restrict the `Trait::{opaque}` type in a `where` clause:

```
error[E0310]: the associated type `&lt;T as Original&gt;::{opaque#0}` may not live long enough
  --&gt; $DIR/missing-static-bound-from-impl.rs:11:9
   |
LL |         Box::new(&lt;T as Original&gt;::f())
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |         |
   |         the associated type `&lt;T as Original&gt;::{opaque#0}` must be valid for the static lifetime...
   |         ...so that the type `impl Fn()` will meet its required lifetime bounds
```

CC #119773.
</content>
</entry>
</feed>
