<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/ui/pattern/move-ref-patterns, 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>2025-07-25T18:34:10+00:00</updated>
<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>cleaned up some tests</title>
<updated>2025-07-04T19:45:24+00:00</updated>
<author>
<name>Kivooeo</name>
<email>Kivooeo123@gmail.com</email>
</author>
<published>2025-07-01T13:24:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b28806da237176468ab2afae42b51fe43ad416e6'/>
<id>urn:sha1:b28806da237176468ab2afae42b51fe43ad416e6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>moved tests</title>
<updated>2025-07-01T13:21:05+00:00</updated>
<author>
<name>Kivooeo</name>
<email>Kivooeo123@gmail.com</email>
</author>
<published>2025-07-01T13:21:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=986f1c9b692665d4e7388062b8d8536acb0c99fd'/>
<id>urn:sha1:986f1c9b692665d4e7388062b8d8536acb0c99fd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Better span for "make binding mutable" suggestion</title>
<updated>2024-07-04T02:02:21+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-07-03T21:01:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=89ecae5d852a7346ee4e8240ae7a1130f1f6f458'/>
<id>urn:sha1:89ecae5d852a7346ee4e8240ae7a1130f1f6f458</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Suggest ref mut for pattern matching assignment</title>
<updated>2024-04-24T20:54:25+00:00</updated>
<author>
<name>yukang</name>
<email>moorekang@gmail.com</email>
</author>
<published>2024-01-06T05:13:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=be9dbe910265da4f990d9adddb850cb2c72e63de'/>
<id>urn:sha1:be9dbe910265da4f990d9adddb850cb2c72e63de</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives</title>
<updated>2024-02-16T20:02:50+00:00</updated>
<author>
<name>许杰友 Jieyou Xu (Joe)</name>
<email>jieyouxu@outlook.com</email>
</author>
<published>2024-02-16T20:02:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ec2cc761bc7067712ecc7734502f703fe3b024c8'/>
<id>urn:sha1:ec2cc761bc7067712ecc7734502f703fe3b024c8</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>Rename `drop_ref` lint to `dropping_references`</title>
<updated>2023-05-21T12:16:41+00:00</updated>
<author>
<name>Urgau</name>
<email>urgau@numericable.fr</email>
</author>
<published>2023-05-19T09:25:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c93d9c1794eb8d57fd2f108547192c3aeb92b505'/>
<id>urn:sha1:c93d9c1794eb8d57fd2f108547192c3aeb92b505</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Adjust tests for new drop and forget lints</title>
<updated>2023-05-10T17:36:02+00:00</updated>
<author>
<name>Urgau</name>
<email>urgau@numericable.fr</email>
</author>
<published>2023-03-29T20:18:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=61ff2718f76ac1ea0669938a06babfd578fadd46'/>
<id>urn:sha1:61ff2718f76ac1ea0669938a06babfd578fadd46</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tweak spans for `ref mut` suggestion</title>
<updated>2023-05-05T10:40:05+00:00</updated>
<author>
<name>Ezra Shaw</name>
<email>ezrasure@outlook.com</email>
</author>
<published>2023-04-20T06:58:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=87a1b3840ecfebdcd22313ed37f0609732d8cf83'/>
<id>urn:sha1:87a1b3840ecfebdcd22313ed37f0609732d8cf83</id>
<content type='text'>
</content>
</entry>
</feed>
