<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_borrowck/src/diagnostics, branch 1.76.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.76.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.76.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2023-12-18T05:06:22+00:00</updated>
<entry>
<title>Rename many `DiagCtxt` arguments.</title>
<updated>2023-12-18T05:06:22+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-12-17T23:15:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f422dca3ae8b8a8c9a99b8e6ec0899e08dc072c3'/>
<id>urn:sha1:f422dca3ae8b8a8c9a99b8e6ec0899e08dc072c3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename `Session::span_diagnostic` as `Session::dcx`.</title>
<updated>2023-12-18T05:06:21+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-12-17T19:21:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=09af8a667c0fa456bbe62fa462f4b0f42f2845ec'/>
<id>urn:sha1:09af8a667c0fa456bbe62fa462f4b0f42f2845ec</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename `Handler` as `DiagCtxt`.</title>
<updated>2023-12-18T05:06:19+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-12-17T10:48:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cde19c016e4608288a02f5bdec0b5330d474c26f'/>
<id>urn:sha1:cde19c016e4608288a02f5bdec0b5330d474c26f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>banish hir::GenericBound::LangItemTrait</title>
<updated>2023-12-15T16:17:27+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2023-11-23T04:55:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fc010de26b998e02323955914f0df6614f29816b'/>
<id>urn:sha1:fc010de26b998e02323955914f0df6614f29816b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move some methods from `tcx.hir()` to `tcx`</title>
<updated>2023-12-12T14:40:29+00:00</updated>
<author>
<name>zetanumbers</name>
<email>dariasukhonina@gmail.com</email>
</author>
<published>2023-12-01T13:28:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=24f009c5e55d18c12563dd74681ca33b8a349936'/>
<id>urn:sha1:24f009c5e55d18c12563dd74681ca33b8a349936</id>
<content type='text'>
Renamings:
- find -&gt; opt_hir_node
- get -&gt; hir_node
- find_by_def_id -&gt; opt_hir_node_by_def_id
- get_by_def_id -&gt; hir_node_by_def_id

Fix rebase changes using removed methods

Use `tcx.hir_node_by_def_id()` whenever possible in compiler

Fix clippy errors

Fix compiler

Apply suggestions from code review

Co-authored-by: Vadim Petrochenkov &lt;vadim.petrochenkov@gmail.com&gt;

Add FIXME for `tcx.hir()` returned type about its removal

Simplify with with `tcx.hir_node_by_def_id`
</content>
</entry>
<entry>
<title>remove some redundant clones</title>
<updated>2023-12-11T20:54:36+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2023-12-11T20:54:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0564de10b1d4cd7340dfd8b91af2c88782af2a19'/>
<id>urn:sha1:0564de10b1d4cd7340dfd8b91af2c88782af2a19</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implement `async gen` blocks</title>
<updated>2023-12-08T17:23:25+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2023-11-28T18:18:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=96bb542a3171a7cbf23cac45d4b9adc7b05b5317'/>
<id>urn:sha1:96bb542a3171a7cbf23cac45d4b9adc7b05b5317</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Provide more suggestions for cloning immutable bindings</title>
<updated>2023-12-04T21:54:34+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2023-11-21T23:41:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cc80106cb5dda2abc9ab1945639644fff219958d'/>
<id>urn:sha1:cc80106cb5dda2abc9ab1945639644fff219958d</id>
<content type='text'>
When encountering multiple mutable borrows, suggest cloning and adding
derive annotations as needed.

```
error[E0596]: cannot borrow `sm.x` as mutable, as it is behind a `&amp;` reference
  --&gt; $DIR/accidentally-cloning-ref-borrow-error.rs:32:9
   |
LL |     foo(&amp;mut sm.x);
   |         ^^^^^^^^^ `sm` is a `&amp;` reference, so the data it refers to cannot be borrowed as mutable
   |
help: `Str` doesn't implement `Clone`, so this call clones the reference `&amp;Str`
  --&gt; $DIR/accidentally-cloning-ref-borrow-error.rs:31:21
   |
LL |     let mut sm = sr.clone();
   |                     ^^^^^^^
help: consider annotating `Str` with `#[derive(Clone)]`
   |
LL + #[derive(Clone)]
LL | struct Str {
   |
help: consider specifying this binding's type
   |
LL |     let mut sm: &amp;mut Str = sr.clone();
   |               ++++++++++
```

```
error[E0596]: cannot borrow `*inner` as mutable, as it is behind a `&amp;` reference
  --&gt; $DIR/issue-91206.rs:14:5
   |
LL |     inner.clear();
   |     ^^^^^ `inner` is a `&amp;` reference, so the data it refers to cannot be borrowed as mutable
   |
help: you can `clone` the `Vec&lt;usize&gt;` value and consume it, but this might not be your desired behavior
  --&gt; $DIR/issue-91206.rs:11:17
   |
LL |     let inner = client.get_inner_ref();
   |                 ^^^^^^^^^^^^^^^^^^^^^^
help: consider specifying this binding's type
   |
LL |     let inner: &amp;mut Vec&lt;usize&gt; = client.get_inner_ref();
   |              +++++++++++++++++
```
</content>
</entry>
<entry>
<title>Deduplicate some logic</title>
<updated>2023-12-04T21:54:33+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2023-11-21T21:24:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=210a672005aeeb251ebfeeda49c61bb2d44a4480'/>
<id>urn:sha1:210a672005aeeb251ebfeeda49c61bb2d44a4480</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Tweak output on specific case</title>
<updated>2023-12-04T21:54:32+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2023-11-20T23:13:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=90db53674115829d4ec8903515c15c7488d6e447'/>
<id>urn:sha1:90db53674115829d4ec8903515c15c7488d6e447</id>
<content type='text'>
</content>
</entry>
</feed>
