<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libcore/convert/num.rs, branch 1.44.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.44.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.44.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2020-03-29T14:27:07+00:00</updated>
<entry>
<title>Stabilize float::to_int_unchecked</title>
<updated>2020-03-29T14:27:07+00:00</updated>
<author>
<name>Mark Rousskov</name>
<email>mark.simulacrum@gmail.com</email>
</author>
<published>2020-03-27T23:18:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=56147219a552b8383e66f9e3e8f0c92ea332aaf4'/>
<id>urn:sha1:56147219a552b8383e66f9e3e8f0c92ea332aaf4</id>
<content type='text'>
This renames and stabilizes unsafe floating point to integer casts, which are
intended to be the substitute for the currently unsound `as` behavior, once that
changes to safe-but-slower saturating casts.
</content>
</entry>
<entry>
<title>Use Self instead of $type</title>
<updated>2020-01-06T04:33:31+00:00</updated>
<author>
<name>Lzu Tao</name>
<email>taolzu@gmail.com</email>
</author>
<published>2020-01-06T04:33:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c7dbf5ad540402bb6f8f09d9d7f903316232cea5'/>
<id>urn:sha1:c7dbf5ad540402bb6f8f09d9d7f903316232cea5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Propagate cfg bootstrap</title>
<updated>2019-12-18T17:16:19+00:00</updated>
<author>
<name>Mark Rousskov</name>
<email>mark.simulacrum@gmail.com</email>
</author>
<published>2019-12-18T17:00:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=82184440ecd33e87cd03a8f7c70af2ad95d5400f'/>
<id>urn:sha1:82184440ecd33e87cd03a8f7c70af2ad95d5400f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>move from non zero impls to `libcore/convert/num.rs`</title>
<updated>2019-12-08T23:49:30+00:00</updated>
<author>
<name>Peter</name>
<email>peter.wilkins@polecat.com</email>
</author>
<published>2019-12-08T23:16:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8f6a06285efe12d778ff7f44067aebeed7b14428'/>
<id>urn:sha1:8f6a06285efe12d778ff7f44067aebeed7b14428</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move numeric `From` and `TryFrom` impls to `libcore/convert/num.rs`</title>
<updated>2019-12-06T13:00:45+00:00</updated>
<author>
<name>Simon Sapin</name>
<email>simon.sapin@exyr.org</email>
</author>
<published>2019-12-02T08:44:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a213ff82998ef91fa793883c2f2ebbc574967500'/>
<id>urn:sha1:a213ff82998ef91fa793883c2f2ebbc574967500</id>
<content type='text'>
This makes `libcore/num/mod.rs` slightly smaller. It’s still 4911 lines and not easy to navigate. This doesn’t change any public API.
</content>
</entry>
<entry>
<title>Add `{f32,f64}::approx_unchecked_to&lt;Int&gt;` unsafe methods</title>
<updated>2019-12-06T13:01:05+00:00</updated>
<author>
<name>Simon Sapin</name>
<email>simon.sapin@exyr.org</email>
</author>
<published>2019-11-28T14:24:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cba479f75c7513f91f727741882a99442f393c12'/>
<id>urn:sha1:cba479f75c7513f91f727741882a99442f393c12</id>
<content type='text'>
As discussed in https://github.com/rust-lang/rust/issues/10184

Currently, casting a floating point number to an integer with `as` is Undefined Behavior if the value is out of range. `-Z saturating-float-casts` fixes this soundness hole by making `as` “saturate” to the maximum or minimum value of the integer type (or zero for `NaN`), but has measurable negative performance impact in some benchmarks. There is some consensus in that thread for enabling saturation by default anyway, but provide an `unsafe fn` alternative for users who know through some other mean that their values are in range.
</content>
</entry>
</feed>
