<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_infer/src/errors, branch master</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=master</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-10-06T22:50:50+00:00</updated>
<entry>
<title>Rename `errors/mod.rs` as `errors.rs`.</title>
<updated>2024-10-06T22:50:50+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-10-01T06:11:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7a9bbd05c42f1c6b0d920a4e741ea28452916c99'/>
<id>urn:sha1:7a9bbd05c42f1c6b0d920a4e741ea28452916c99</id>
<content type='text'>
It's simpler, for this tiny module.
</content>
</entry>
<entry>
<title>Add `warn(unreachable_pub)` to `rustc_infer`.</title>
<updated>2024-08-27T04:47:56+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-08-27T04:47:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=688792715bb1e3c420e896b62ee3e825dce4c174'/>
<id>urn:sha1:688792715bb1e3c420e896b62ee3e825dce4c174</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move all error reporting into rustc_trait_selection</title>
<updated>2024-07-22T02:34:35+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-07-21T19:20:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ce8a625092fa48c2be475f659aa2a91b5591108f'/>
<id>urn:sha1:ce8a625092fa48c2be475f659aa2a91b5591108f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move need_type_info too</title>
<updated>2024-07-22T02:33:15+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-07-21T18:25:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f49738ba6c904b75de8b342d4a4fb9664819b2a1'/>
<id>urn:sha1:f49738ba6c904b75de8b342d4a4fb9664819b2a1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix precise capturing suggestion for hidden type when APITs are involved</title>
<updated>2024-07-17T14:52:13+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-07-12T20:18:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1d40d4c4f496ce26d2cbf268b2f415e1f3bd5616'/>
<id>urn:sha1:1d40d4c4f496ce26d2cbf268b2f415e1f3bd5616</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move rustc_infer::infer::error_reporting to rustc_infer::error_reporting::infer</title>
<updated>2024-07-16T00:16:12+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-07-09T01:03:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e86fbcfd7048dba4eb9b6461069f476d273a3b64'/>
<id>urn:sha1:e86fbcfd7048dba4eb9b6461069f476d273a3b64</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Make it translatable too</title>
<updated>2024-07-11T18:14:17+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-07-11T18:14:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=42653c0045e46c26d2468b2aa2bba97802c08795'/>
<id>urn:sha1:42653c0045e46c26d2468b2aa2bba97802c08795</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove `DefId` from `EarlyParamRegion` (tedium/diagnostics)</title>
<updated>2024-05-24T17:06:53+00:00</updated>
<author>
<name>Boxy</name>
<email>supbscripter@gmail.com</email>
</author>
<published>2024-05-24T00:57:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fe2d7794ca189f9ec5e7f7fd9b059e7a2e785944'/>
<id>urn:sha1:fe2d7794ca189f9ec5e7f7fd9b059e7a2e785944</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Detect when a lifetime is being reused in suggestion</title>
<updated>2024-05-17T21:23:47+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-05-17T21:23:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cf5702ee91dd9ba93c19aae9e663e613a577d02b'/>
<id>urn:sha1:cf5702ee91dd9ba93c19aae9e663e613a577d02b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Tweak suggested lifetimes to modify return type instead of `&amp;self` receiver</title>
<updated>2024-05-17T20:31:13+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-05-07T19:54:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1775e7b93d4142eb2e4c75c2d49a9c4d8541d7a6'/>
<id>urn:sha1:1775e7b93d4142eb2e4c75c2d49a9c4d8541d7a6</id>
<content type='text'>
Do not suggest constraining the `&amp;self` param, but rather the return type.
If that is wrong (because it is not sufficient), a follow up error will tell the
user to fix it. This way we lower the chances of *over* constraining, but still
get the cake of "correctly" contrained in two steps.

This is a correct suggestion:

```
error: lifetime may not live long enough
  --&gt; $DIR/ex3-both-anon-regions-return-type-is-anon.rs:9:9
   |
LL |     fn foo&lt;'a&gt;(&amp;self, x: &amp;i32) -&gt; &amp;i32 {
   |                -         - let's call the lifetime of this reference `'1`
   |                |
   |                let's call the lifetime of this reference `'2`
LL |         x
   |         ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
   |
help: consider introducing a named lifetime parameter and update trait if needed
   |
LL |     fn foo&lt;'a&gt;(&amp;self, x: &amp;'a i32) -&gt; &amp;'a i32 {
   |                           ++          ++
```

While this is incomplete because it should suggestino `&amp;'a self`

```
error: lifetime may not live long enough
  --&gt; $DIR/ex3-both-anon-regions-self-is-anon.rs:7:19
   |
LL |     fn foo&lt;'a&gt;(&amp;self, x: &amp;Foo) -&gt; &amp;Foo {
   |                -         - let's call the lifetime of this reference `'1`
   |                |
   |                let's call the lifetime of this reference `'2`
LL |         if true { x } else { self }
   |                   ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
   |
help: consider introducing a named lifetime parameter and update trait if needed
   |
LL |     fn foo&lt;'a&gt;(&amp;self, x: &amp;'a Foo) -&gt; &amp;'a Foo {
   |                           ++          ++
```

but the follow up error is

```
error: lifetime may not live long enough
 --&gt; tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.rs:7:30
  |
6 |     fn foo&lt;'a&gt;(&amp;self, x: &amp;'a Foo) -&gt; &amp;'a Foo {
  |            --  - let's call the lifetime of this reference `'1`
  |            |
  |            lifetime `'a` defined here
7 |         if true { x } else { self }
  |                              ^^^^ method was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
  |
help: consider introducing a named lifetime parameter and update trait if needed
  |
6 |     fn foo&lt;'a&gt;(&amp;'a self, x: &amp;'a Foo) -&gt; &amp;'a Foo {
  |                 ++
```
</content>
</entry>
</feed>
