<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/ui/moves, branch try-perf</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=try-perf</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=try-perf'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-08-19T19:27:10+00:00</updated>
<entry>
<title>bless tests with new lint messages</title>
<updated>2025-08-19T19:27:10+00:00</updated>
<author>
<name>Karol Zwolak</name>
<email>karolzwolak7@gmail.com</email>
</author>
<published>2025-04-28T11:47:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d14b83e378c421dd09320ace833a9d47848e3046'/>
<id>urn:sha1:d14b83e378c421dd09320ace833a9d47848e3046</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Adjust error message grammar to be less awkward</title>
<updated>2025-08-14T16:50:07+00:00</updated>
<author>
<name>Jake Goulding</name>
<email>jake.goulding@gmail.com</email>
</author>
<published>2025-08-14T16:50:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=65d329d189651f5f4612e87132ca6c041cf61ab4'/>
<id>urn:sha1:65d329d189651f5f4612e87132ca6c041cf61ab4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Point at the `Fn()` or `FnMut()` bound that coerced a closure, which caused a move error</title>
<updated>2025-08-10T19:22:49+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2025-07-28T02:01:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1aa5668d20d53976860d141a66aa727e425e1079'/>
<id>urn:sha1:1aa5668d20d53976860d141a66aa727e425e1079</id>
<content type='text'>
When encountering a move error involving a closure because the captured value isn't `Copy`, and the obligation comes from a bound on a type parameter that requires `Fn` or `FnMut`, we point at it and explain that an `FnOnce` wouldn't cause the move error.

```
error[E0507]: cannot move out of `foo`, a captured variable in an `Fn` closure
  --&gt; f111.rs:15:25
   |
14 | fn do_stuff(foo: Option&lt;Foo&gt;) {
   |             ---  ----------- move occurs because `foo` has type `Option&lt;Foo&gt;`, which does not implement the `Copy` trait
   |             |
   |             captured outer variable
15 |     require_fn_trait(|| async {
   |                      -- ^^^^^ `foo` is moved here
   |                      |
   |                      captured by this `Fn` closure
16 |         if foo.map_or(false, |f| f.foo()) {
   |            --- variable moved due to use in coroutine
   |
help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
  --&gt; f111.rs:12:53
   |
12 | fn require_fn_trait&lt;F: Future&lt;Output = ()&gt;&gt;(_: impl Fn() -&gt; F) {}
   |                                                     ^^^^^^^^^
help: consider cloning the value if the performance cost is acceptable
   |
16 |         if foo.clone().map_or(false, |f| f.foo()) {
   |               ++++++++
```
</content>
</entry>
<entry>
<title>Rollup merge of #145191 - dianne:fix-borrow-suggestion-args, r=compiler-errors</title>
<updated>2025-08-10T09:45:56+00:00</updated>
<author>
<name>Stuart Cook</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-08-10T09:45:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=934cb10f1b21be3a855951fb9b1f38094946aac8'/>
<id>urn:sha1:934cb10f1b21be3a855951fb9b1f38094946aac8</id>
<content type='text'>
`suggest_borrow_generic_arg`: use the correct generic args

The suggestion now gets calls' generic arguments from the callee's type to handle cases where the callee isn't an identifier expression. Fixes rust-lang/rust#145164.
</content>
</entry>
<entry>
<title>Rollup merge of #144403 - Kivooeo:issue4, r=jieyouxu</title>
<updated>2025-08-10T09:45:48+00:00</updated>
<author>
<name>Stuart Cook</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-08-10T09:45:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=62b406d4b185f28828df3e0df6b1aa1f560145df'/>
<id>urn:sha1:62b406d4b185f28828df3e0df6b1aa1f560145df</id>
<content type='text'>
`tests/ui/issues/`: The Issues Strike Back [4/N]

Some `tests/ui/issues/` housekeeping, to trim down number of tests directly under `tests/ui/issues/`. Part of https://github.com/rust-lang/rust/issues/133895.

r? ````````@jieyouxu````````
</content>
</entry>
<entry>
<title>`suggest_borrow_generic_arg`: use the correct generic args</title>
<updated>2025-08-10T01:31:35+00:00</updated>
<author>
<name>dianne</name>
<email>diannes.gm@gmail.com</email>
</author>
<published>2025-08-10T01:07:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a70a312f172c9d74f0b01bd2a6e1d9d77bcf6771'/>
<id>urn:sha1:a70a312f172c9d74f0b01bd2a6e1d9d77bcf6771</id>
<content type='text'>
</content>
</entry>
<entry>
<title>comments</title>
<updated>2025-08-09T11:27:20+00:00</updated>
<author>
<name>Kivooeo</name>
<email>Kivooeo123@gmail.com</email>
</author>
<published>2025-07-24T14:07:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=16765639b30741dde85da0dbcb44c343eb82b1a2'/>
<id>urn:sha1:16765639b30741dde85da0dbcb44c343eb82b1a2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rehome tests/ui/issues/ tests [3/?]</title>
<updated>2025-08-04T20:43:53+00:00</updated>
<author>
<name>Oneirical</name>
<email>manchot@videotron.ca</email>
</author>
<published>2025-07-13T20:25:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7196d8cd661b875401126a81641d2effc40b3d85'/>
<id>urn:sha1:7196d8cd661b875401126a81641d2effc40b3d85</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Mention type that could be `Clone` but isn't in more cases</title>
<updated>2025-07-25T18:34:10+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2025-07-20T03:15:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=11061831f703fdb5d05816860368e4b9ab4edee7'/>
<id>urn:sha1:11061831f703fdb5d05816860368e4b9ab4edee7</id>
<content type='text'>
When encountering a moved value of a type that isn't `Clone` because of unmet obligations, but where all the unmet predicates reference crate-local types, mention them and suggest cloning, as we do in other cases already:

```
error[E0507]: cannot move out of `foo`, a captured variable in an `Fn` closure
  --&gt; f111.rs:14:25
   |
13 | fn do_stuff(foo: Option&lt;Foo&gt;) {
   |             --- captured outer variable
14 |     require_fn_trait(|| async {
   |                      -- ^^^^^ `foo` is moved here
   |                      |
   |                      captured by this `Fn` closure
15 |         if foo.map_or(false, |f| f.foo()) {
   |            ---
   |            |
   |            variable moved due to use in coroutine
   |            move occurs because `foo` has type `Option&lt;Foo&gt;`, which does not implement the `Copy` trait
   |
note: if `Foo` implemented `Clone`, you could clone the value
  --&gt; f111.rs:4:1
   |
4  | struct Foo;
   | ^^^^^^^^^^ consider implementing `Clone` for this type
...
15 |         if foo.map_or(false, |f| f.foo()) {
   |            --- you could clone this value
```
</content>
</entry>
<entry>
<title>moved 34 tests to organized locations</title>
<updated>2025-07-25T10:34:28+00:00</updated>
<author>
<name>Kivooeo</name>
<email>Kivooeo123@gmail.com</email>
</author>
<published>2025-07-24T13:29:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=90bb5cacb5c1a5fe20ba821d28e7eb7a21e35d09'/>
<id>urn:sha1:90bb5cacb5c1a5fe20ba821d28e7eb7a21e35d09</id>
<content type='text'>
</content>
</entry>
</feed>
