<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/std/src/sync/lazy_lock, branch 1.75.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.75.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.75.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2022-10-29T08:56:20+00:00</updated>
<entry>
<title>More inference-friendly API for lazy</title>
<updated>2022-10-29T08:56:20+00:00</updated>
<author>
<name>Aleksey Kladov</name>
<email>aleksey.kladov@gmail.com</email>
</author>
<published>2022-10-29T08:56:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3cddc8bff6d5357fc68a87c802a7f4fa3e1642a7'/>
<id>urn:sha1:3cddc8bff6d5357fc68a87c802a7f4fa3e1642a7</id>
<content type='text'>
The signature for new was

```
fn new&lt;F&gt;(f: F) -&gt; Lazy&lt;T, F&gt;
```

Notably, with `F` unconstrained, `T` can be literally anything, and just
`let _ = Lazy::new(|| 92)` would not typecheck.

This historiacally was a necessity -- `new` is a `const` function, it
couldn't have any bounds. Today though, we can move `new` under the `F:
FnOnce() -&gt; T` bound, which gives the compiler enough data to infer the
type of T from closure.
</content>
</entry>
<entry>
<title>Move/rename `lazy::Sync{OnceCell,Lazy}` to `sync::{Once,Lazy}Lock`</title>
<updated>2022-06-16T15:54:42+00:00</updated>
<author>
<name>Maybe Waffle</name>
<email>waffle.lapkin@gmail.com</email>
</author>
<published>2022-06-16T15:39:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c1a2db3372a4d6896744919284f3287650a38ab7'/>
<id>urn:sha1:c1a2db3372a4d6896744919284f3287650a38ab7</id>
<content type='text'>
</content>
</entry>
</feed>
