<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/test/ui/nll/user-annotations, branch 1.45.2</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.45.2</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.45.2'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2020-05-27T23:27:15+00:00</updated>
<entry>
<title>Fix spacing of expected/found notes without a label</title>
<updated>2020-05-27T23:27:15+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2019-12-20T03:44:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3fea832fd7cbff73cf8d5d409ea9aeee0577b0ac'/>
<id>urn:sha1:3fea832fd7cbff73cf8d5d409ea9aeee0577b0ac</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bless output of ui test nll/user-annotations/closure-substs.rs</title>
<updated>2020-03-29T23:30:26+00:00</updated>
<author>
<name>Remy Rakic</name>
<email>remy.rakic@gmail.com</email>
</author>
<published>2020-03-29T23:30:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5af11d261d38c6dad4475c933ffa59a388979cfb'/>
<id>urn:sha1:5af11d261d38c6dad4475c933ffa59a388979cfb</id>
<content type='text'>
Trivial diagnostics grammar change
</content>
</entry>
<entry>
<title>Use TypeRelating for instantiating query responses</title>
<updated>2020-02-29T12:28:32+00:00</updated>
<author>
<name>Matthew Jasper</name>
<email>mjjasper1@gmail.com</email>
</author>
<published>2020-02-29T12:28:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cbf5f7d23c4c0c91580245f36fda3ba1b6a12069'/>
<id>urn:sha1:cbf5f7d23c4c0c91580245f36fda3ba1b6a12069</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use check-pass mode for nll tests</title>
<updated>2020-01-23T00:00:00+00:00</updated>
<author>
<name>Tomasz Miąsko</name>
<email>tomasz.miasko@gmail.com</email>
</author>
<published>2020-01-23T00:00:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5c73d21eaa48b7c94bedcc5352fcbc7d749ed48b'/>
<id>urn:sha1:5c73d21eaa48b7c94bedcc5352fcbc7d749ed48b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bless polonius output due to lacking the 'static special-casing</title>
<updated>2019-12-06T10:50:02+00:00</updated>
<author>
<name>Remy Rakic</name>
<email>remy.rakic@gmail.com</email>
</author>
<published>2019-12-02T17:54:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=720716f9d08094e66581ce069caaa500ee4e04e6'/>
<id>urn:sha1:720716f9d08094e66581ce069caaa500ee4e04e6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Include a span in more `expected...found` notes</title>
<updated>2019-12-04T04:13:10+00:00</updated>
<author>
<name>Aaron Hill</name>
<email>aa1ronham@gmail.com</email>
</author>
<published>2019-12-04T03:20:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=168e35d56935b265d9c3ce767430f40ed7448d05'/>
<id>urn:sha1:168e35d56935b265d9c3ce767430f40ed7448d05</id>
<content type='text'>
In most places, we use a span when emitting `expected...found` errors.
However, there were a couple of places where we didn't use any span,
resulting in hard-to-interpret error messages.

This commit attaches the relevant span to these notes, and additionally
switches over to using `note_expected_found` instead of manually
formatting the message
</content>
</entry>
<entry>
<title>Auto merge of #58281 - mark-i-m:synthesis, r=estebank</title>
<updated>2019-11-18T22:08:31+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2019-11-18T22:08:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0ccee30773050f6bf50fd6ceb9ac61e6d58aa4d8'/>
<id>urn:sha1:0ccee30773050f6bf50fd6ceb9ac61e6d58aa4d8</id>
<content type='text'>
Add outlives suggestions for some lifetime errors

This PR implements suggestion diagnostics for some lifetime mismatch errors. When the borrow checker finds that some lifetime 'a doesn't outlive some other lifetime 'b that it should outlive, then in addition to the current lifetime error, we also emit a suggestion for how to fix the problem by adding a bound:

- If a and b are normal named regions, suggest to add the bound `'a: 'b`
- If b is static, suggest to replace a with static
- If b also needs to outlive a, they must be the same, so suggest unifying  them

We start with a simpler implementation that avoids diagnostic regression or implementation complexity:
- We only makes suggestions for lifetimes the user can already name (eg not closure regions or elided regions)
- For now, we only emit a help note, not an actually suggestion because it is significantly easier.

Finally, there is one hack: it seems that implicit regions in async fn are given the name '_ incorrectly. To avoid suggesting '_: 'x, we simply filter out such lifetimes by name.

For more info, see this internals thread:

https://internals.rust-lang.org/t/mechanical-suggestions-for-some-borrow-checker-errors/9049/3

TL;DR Make suggestions to add a `where 'a: 'b` constraint for some lifetime errors. Details are in the paper linked from the internals thread above.

r? @estebank

TODO
- [x] Clean up code
- [x] Only make idiomatic suggestions
     - [x] don't suggest naming `&amp;'a self`
     - [x] rather than `'a: 'static`, suggest replacing `'a` with `'static`
     - [x] rather than `'a: 'b, 'b: 'a`, suggest replacing `'a` with `'b` or vice versa
- [x] Performance (maybe need a perf run when this is closer to the finish line?)
     - perf run was clean...
     - EDIT: perf run seems to only check non-error performance... How do we check that error performance didn't regress?
- [x] Needs ui tests
- [x] Integrate the `help` message into the main lifetime `error`
</content>
</entry>
<entry>
<title>Use check-pass in ui tests where appropriate</title>
<updated>2019-11-04T15:03:46+00:00</updated>
<author>
<name>Tomasz Miąsko</name>
<email>tomasz.miasko@gmail.com</email>
</author>
<published>2019-11-04T00:00:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0501d8ab0dfbd5fe817ca62efbbfadd453fa7b68'/>
<id>urn:sha1:0501d8ab0dfbd5fe817ca62efbbfadd453fa7b68</id>
<content type='text'>
</content>
</entry>
<entry>
<title>update tests</title>
<updated>2019-10-27T14:39:14+00:00</updated>
<author>
<name>Mark Mansi</name>
<email>markm@cs.wisc.edu</email>
</author>
<published>2019-10-27T14:39:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cba0761e5f3677b90390fe7aee1eeda684296658'/>
<id>urn:sha1:cba0761e5f3677b90390fe7aee1eeda684296658</id>
<content type='text'>
</content>
</entry>
<entry>
<title>implement outlive suggestions</title>
<updated>2019-10-27T13:47:22+00:00</updated>
<author>
<name>Mark Mansi</name>
<email>markm@cs.wisc.edu</email>
</author>
<published>2018-11-28T21:05:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3a1847b07d552fff62be4ebf11e74f90b6a43fce'/>
<id>urn:sha1:3a1847b07d552fff62be4ebf11e74f90b6a43fce</id>
<content type='text'>
</content>
</entry>
</feed>
