<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.polonius.stderr, branch perf-tmp</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-09-28T20:55:35+00:00</updated>
<entry>
<title>reword note</title>
<updated>2025-09-28T20:55:35+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2025-08-31T20:42:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4973903cd204dd2cd36e15267de72ed6d954e3a6'/>
<id>urn:sha1:4973903cd204dd2cd36e15267de72ed6d954e3a6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Point at lifetime requirement origin in more cases</title>
<updated>2025-09-28T20:55:34+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2025-08-29T20:14:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7a0319f01d08e541c8e16febaa68c5fa8b66b586'/>
<id>urn:sha1:7a0319f01d08e541c8e16febaa68c5fa8b66b586</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Point at fn bound that introduced lifetime obligation</title>
<updated>2025-09-28T20:55:34+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2025-08-29T19:35:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c3e0b29e79f347edf7e0ae559bfec2d3cdf353d8'/>
<id>urn:sha1:c3e0b29e79f347edf7e0ae559bfec2d3cdf353d8</id>
<content type='text'>
```
error[E0597]: `c` does not live long enough
  --&gt; $DIR/without-precise-captures-we-are-powerless.rs:19:20
   |
LL | fn simple&lt;'a&gt;(x: &amp;'a i32) {
   |           -- lifetime `'a` defined here
...
LL |     let c = async move || { println!("{}", *x); };
   |         - binding `c` declared here
LL |     outlives::&lt;'a&gt;(c());
   |     ---------------^---
   |     |              |
   |     |              borrowed value does not live long enough
   |     argument requires that `c` is borrowed for `'a`
LL |     outlives::&lt;'a&gt;(call_once(c));
LL | }
   | - `c` dropped here while still borrowed
   |
note: requirement that `c` is borrowed for `'a` introduced here
  --&gt; $DIR/without-precise-captures-we-are-powerless.rs:7:33
   |
LL | fn outlives&lt;'a&gt;(_: impl Sized + 'a) {}
   |                                 ^^
```

When encountering a `ConstraintCategory::Predicate` in a funtion call, point at the `Span` for that `Predicate` to explain where the lifetime obligation originates from.
</content>
</entry>
<entry>
<title>it's not a borrow checker limitation :&lt;</title>
<updated>2025-08-14T15:43:39+00:00</updated>
<author>
<name>lcnr</name>
<email>rust@lcnr.de</email>
</author>
<published>2025-08-13T12:08:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3ebf611005370734ddf7ce22e41ac502e4fff59a'/>
<id>urn:sha1:3ebf611005370734ddf7ce22e41ac502e4fff59a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rework `add_placeholder_from_predicate_note`</title>
<updated>2025-08-13T12:03:26+00:00</updated>
<author>
<name>lcnr</name>
<email>rust@lcnr.de</email>
</author>
<published>2025-08-07T09:30:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a95a2ac476ef04ccf8cfabd35e6fcdb9569f053d'/>
<id>urn:sha1:a95a2ac476ef04ccf8cfabd35e6fcdb9569f053d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Modify `find_expr` from `Span` to better account for closures</title>
<updated>2024-04-24T22:21:13+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-04-18T20:41:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4aba2c55e6bbe6c09132ff19360d302269dca775'/>
<id>urn:sha1:4aba2c55e6bbe6c09132ff19360d302269dca775</id>
<content type='text'>
Start pointing to where bindings were declared when they are captured in closures:

```
error[E0597]: `x` does not live long enough
  --&gt; $DIR/suggest-return-closure.rs:23:9
   |
LL |     let x = String::new();
   |         - binding `x` declared here
...
LL |     |c| {
   |     --- value captured here
LL |         x.push(c);
   |         ^ borrowed value does not live long enough
...
LL | }
   | -- borrow later used here
   | |
   | `x` dropped here while still borrowed
```

Suggest cloning in more cases involving closures:

```
error[E0507]: cannot move out of `foo` in pattern guard
  --&gt; $DIR/issue-27282-move-ref-mut-into-guard.rs:11:19
   |
LL |             if { (|| { let mut bar = foo; bar.take() })(); false } =&gt; {},
   |                   ^^                 --- move occurs because `foo` has type `&amp;mut Option&lt;&amp;i32&gt;`, which does not implement the `Copy` trait
   |                   |
   |                   `foo` is moved here
   |
   = note: variables bound in patterns cannot be moved from until after the end of the pattern guard
help: consider cloning the value if the performance cost is acceptable
   |
LL |             if { (|| { let mut bar = foo.clone(); bar.take() })(); false } =&gt; {},
   |                                         ++++++++
```
</content>
</entry>
<entry>
<title>add test for issue 117146</title>
<updated>2023-11-04T01:04:12+00:00</updated>
<author>
<name>Rémy Rakic</name>
<email>remy.rakic+github@gmail.com</email>
</author>
<published>2023-11-04T01:03:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2dff90dc233dd30244191af6a71e3b2d85a551eb'/>
<id>urn:sha1:2dff90dc233dd30244191af6a71e3b2d85a551eb</id>
<content type='text'>
</content>
</entry>
</feed>
