<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/ui/pattern/struct-pattern-with-missing-fields-resolve-error.rs, branch 1.90.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.90.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.90.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-01-08T00:10:16+00:00</updated>
<entry>
<title>Add check for missing fields in enum variant pattern</title>
<updated>2025-01-08T00:10:16+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2025-01-08T00:10:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d44f021904e3d5b2870e3c835cbad5e1421e83ec'/>
<id>urn:sha1:d44f021904e3d5b2870e3c835cbad5e1421e83ec</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use `span_label` as it looks better when we show pattern missing binding in order</title>
<updated>2024-12-15T22:58:16+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-12-15T22:58:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=733fd03f0f9d5c8ad595f7b7cde17d3c1f33a19e'/>
<id>urn:sha1:733fd03f0f9d5c8ad595f7b7cde17d3c1f33a19e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Keep track of patterns that could have introduced a binding, but didn't</title>
<updated>2024-12-13T21:51:33+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-12-13T21:51:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0f82cfffda97be546949f974586d007b51e2b36e'/>
<id>urn:sha1:0f82cfffda97be546949f974586d007b51e2b36e</id>
<content type='text'>
When we recover from a pattern parse error, or a pattern uses `..`, we keep track of that and affect resolution error for missing bindings that could have been provided by that pattern. We differentiate between `..` and parse recovery. We silence resolution errors likely caused by the pattern parse error.

```
error[E0425]: cannot find value `title` in this scope
  --&gt; $DIR/struct-pattern-with-missing-fields-resolve-error.rs:19:30
   |
LL |         println!("[{}]({})", title, url);
   |                              ^^^^^ not found in this scope
   |
note: `Website` has a field `title` which could have been included in this pattern, but it wasn't
  --&gt; $DIR/struct-pattern-with-missing-fields-resolve-error.rs:17:12
   |
LL | / struct Website {
LL | |     url: String,
LL | |     title: Option&lt;String&gt; ,
   | |     ----- defined here
LL | | }
   | |_-
...
LL |       if let Website { url, .. } = website {
   |              ^^^^^^^^^^^^^^^^^^^ this pattern doesn't include `title`, which is available in `Website`
```

Fix #74863.
</content>
</entry>
</feed>
