<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/ui/error-codes/E0504.stderr, branch automation/bors/try-merge</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=automation/bors/try-merge</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=automation/bors/try-merge'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-07-26T18:41:56+00:00</updated>
<entry>
<title>Peel off explicit (or implicit) deref before suggesting clone on move error in borrowck</title>
<updated>2024-07-26T18:41:56+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-07-26T18:32:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=91acacf85b9f81aeb41901f8918128bfe02946c8'/>
<id>urn:sha1:91acacf85b9f81aeb41901f8918128bfe02946c8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Mention when type parameter could be `Clone`</title>
<updated>2024-04-24T22:21:15+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-04-18T22:18:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d68f2a6b71df3a4524c390f683dbd7a925ed207f'/>
<id>urn:sha1:d68f2a6b71df3a4524c390f683dbd7a925ed207f</id>
<content type='text'>
```
error[E0382]: use of moved value: `t`
  --&gt; $DIR/use_of_moved_value_copy_suggestions.rs:7:9
   |
LL | fn duplicate_t&lt;T&gt;(t: T) -&gt; (T, T) {
   |                   - move occurs because `t` has type `T`, which does not implement the `Copy` trait
...
LL |     (t, t)
   |      -  ^ value used here after move
   |      |
   |      value moved here
   |
help: if `T` implemented `Clone`, you could clone the value
  --&gt; $DIR/use_of_moved_value_copy_suggestions.rs:4:16
   |
LL | fn duplicate_t&lt;T&gt;(t: T) -&gt; (T, T) {
   |                ^ consider constraining this type parameter with `Clone`
...
LL |     (t, t)
   |      - you could clone this value
help: consider restricting type parameter `T`
   |
LL | fn duplicate_t&lt;T: Copy&gt;(t: T) -&gt; (T, T) {
   |                 ++++++
```

The `help` is new. On ADTs, we also extend the output with span labels:

```
error[E0507]: cannot move out of static item `FOO`
  --&gt; $DIR/issue-17718-static-move.rs:6:14
   |
LL |     let _a = FOO;
   |              ^^^ move occurs because `FOO` has type `Foo`, which does not implement the `Copy` trait
   |
note: if `Foo` implemented `Clone`, you could clone the value
  --&gt; $DIR/issue-17718-static-move.rs:1:1
   |
LL | struct Foo;
   | ^^^^^^^^^^ consider implementing `Clone` for this type
...
LL |     let _a = FOO;
   |              --- you could clone this value
help: consider borrowing here
   |
LL |     let _a = &amp;FOO;
   |              +
```
</content>
</entry>
<entry>
<title>Mention when the type of the moved value doesn't implement `Clone`</title>
<updated>2024-04-11T16:41:42+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-03-17T21:25:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d97d2fe7440ea3032a93fa3ebf8d62fea0337d04'/>
<id>urn:sha1:d97d2fe7440ea3032a93fa3ebf8d62fea0337d04</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix accuracy of `T: Clone` check in suggestion</title>
<updated>2024-04-11T16:41:41+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-03-13T15:37:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5a7caa3174f8174db817228d8c2a02aa4913095c'/>
<id>urn:sha1:5a7caa3174f8174db817228d8c2a02aa4913095c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Account for unops when suggesting cloning</title>
<updated>2024-04-11T16:41:41+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-03-13T02:13:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=bce78102c31c2e71313af1e8119eb882dea35fad'/>
<id>urn:sha1:bce78102c31c2e71313af1e8119eb882dea35fad</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Suggest `.clone()` when moved while borrowed</title>
<updated>2024-04-11T16:41:41+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-03-13T01:51:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fa2fc3ab9638aec571574e551cd9708aa4b64280'/>
<id>urn:sha1:fa2fc3ab9638aec571574e551cd9708aa4b64280</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Show number in error message even for one error</title>
<updated>2023-11-24T18:15:52+00:00</updated>
<author>
<name>Nilstrieb</name>
<email>48135649+Nilstrieb@users.noreply.github.com</email>
</author>
<published>2023-11-21T15:44:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=41e8d152dc5abb5a706999ada8b059d3420af8f3'/>
<id>urn:sha1:41e8d152dc5abb5a706999ada8b059d3420af8f3</id>
<content type='text'>
Co-authored-by: Adrian &lt;adrian.iosdev@gmail.com&gt;
</content>
</entry>
<entry>
<title>Tweak E0597</title>
<updated>2023-01-15T19:46:20+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2023-01-15T03:06:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=656db98bd99caf7e5c5e81ad11ed8922e28c46fb'/>
<id>urn:sha1:656db98bd99caf7e5c5e81ad11ed8922e28c46fb</id>
<content type='text'>
CC #99430
</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>
