<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/ui/borrowck/issue-85765.rs, 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-01-13T22:00:34+00:00</updated>
<entry>
<title>Make InferCtxtExt::could_impl_trait less messed up</title>
<updated>2024-01-13T22:00:34+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-01-13T17:09:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=04a6fd241bc18391b3f1f6ece1b109acd19842f1'/>
<id>urn:sha1:04a6fd241bc18391b3f1f6ece1b109acd19842f1</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>Provide structured suggestion for binding needing type on E0594</title>
<updated>2023-02-03T18:53:27+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2023-02-03T18:53:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=da1360d981f272cc1c3aa81b1fa013fff5b2676d'/>
<id>urn:sha1:da1360d981f272cc1c3aa81b1fa013fff5b2676d</id>
<content type='text'>
Partially address #45405.
</content>
</entry>
<entry>
<title>Move /src/test to /tests</title>
<updated>2023-01-11T09:32:08+00:00</updated>
<author>
<name>Albert Larsan</name>
<email>74931857+albertlarsan68@users.noreply.github.com</email>
</author>
<published>2023-01-05T08:13:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cf2dff2b1e3fa55fa5415d524200070d0d7aacfe'/>
<id>urn:sha1:cf2dff2b1e3fa55fa5415d524200070d0d7aacfe</id>
<content type='text'>
</content>
</entry>
</feed>
