<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libcore/slice, branch stable</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=stable</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=stable'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2020-07-28T00:51:13+00:00</updated>
<entry>
<title>mv std libs to library/</title>
<updated>2020-07-28T00:51:13+00:00</updated>
<author>
<name>mark</name>
<email>markm@cs.wisc.edu</email>
</author>
<published>2020-06-12T02:31:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2c31b45ae878b821975c4ebd94cc1e49f6073fd0'/>
<id>urn:sha1:2c31b45ae878b821975c4ebd94cc1e49f6073fd0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #74510 - LukasKalbertodt:fix-range-from-index-panic, r=hanna-kruppe</title>
<updated>2020-07-25T16:27:24+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2020-07-25T16:27:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fe08fb7b1e7cc5ef45e107f05b3cd30d48313d2b'/>
<id>urn:sha1:fe08fb7b1e7cc5ef45e107f05b3cd30d48313d2b</id>
<content type='text'>
Fix panic message when `RangeFrom` index is out of bounds

Before, the `Range` method was called with `end = slice.len()`. Unfortunately, because `Range::index` first checks the order of the indices (start has to be smaller than end), an out of bounds index leads to `core::slice::slice_index_order_fail` being called. This prints the message 'slice index starts at 27 but ends at 10', which is worse than 'index 27 out of range for slice of length 10'. This is not only useful to normal users reading panic messages, but also for people inspecting assembly and being confused by `slice_index_order_fail` calls.

You can see the produced assembly [here](https://rust.godbolt.org/z/GzMGWf) and try on Playground [here](https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=aada5996b2f3848075a6d02cf4055743). (By the way. this is only about which panic function is called; I'm pretty sure it does not improve anything about performance).
</content>
</entry>
<entry>
<title>Auto merge of #74010 - pierwill:pierwill-o-notation, r=GuillaumeGomez</title>
<updated>2020-07-20T10:19:58+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2020-07-20T10:19:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=71384101ea3b030b80f7def80a37f67e148518b0'/>
<id>urn:sha1:71384101ea3b030b80f7def80a37f67e148518b0</id>
<content type='text'>
Use italics for O notation

In documentation, I think it makes sense to italicize O notation (*O(n)*) as opposed to using back-ticks (`O(n)`). Visually, back-ticks focus the reader on the literal characters being used, making them ideal for representing code. Using italics, as far I can tell, more closely follows typographic conventions in mathematics and computer science.

Just a suggestion, of course! 😇
</content>
</entry>
<entry>
<title>Use italics for O notation</title>
<updated>2020-07-20T04:43:39+00:00</updated>
<author>
<name>pierwill</name>
<email>pierwill@users.noreply.github.com</email>
</author>
<published>2020-07-03T19:13:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=76b8420168a2e14abf025a07ee4e32d87956d940'/>
<id>urn:sha1:76b8420168a2e14abf025a07ee4e32d87956d940</id>
<content type='text'>
Co-authored-by: Guillaume Gomez &lt;guillaume1.gomez@gmail.com&gt;
</content>
</entry>
<entry>
<title>Slightly improve panic messages when range indices are out of bounds</title>
<updated>2020-07-19T22:40:42+00:00</updated>
<author>
<name>Lukas Kalbertodt</name>
<email>lukas.kalbertodt@gmail.com</email>
</author>
<published>2020-07-19T14:12:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0d64b016398f9c0116330089f038b11e2a3c4e1d'/>
<id>urn:sha1:0d64b016398f9c0116330089f038b11e2a3c4e1d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix panic message when `RangeFrom` index is out of bounds</title>
<updated>2020-07-19T14:11:07+00:00</updated>
<author>
<name>Lukas Kalbertodt</name>
<email>lukas.kalbertodt@gmail.com</email>
</author>
<published>2020-07-19T11:45:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ce338046c8b40e3284707d2ab725e9f076592959'/>
<id>urn:sha1:ce338046c8b40e3284707d2ab725e9f076592959</id>
<content type='text'>
Before, the `Range` method was called with `end = slice.len()`.
Unfortunately, because `Range::index` first checks the order of the
indices (start has to be smaller than end), an out of bounds index
leads to `core::slice::slice_index_order_fail` being called. This
prints the message 'slice index starts at 27 but ends at 10', which is
worse than 'index 27 out of range for slice of length 10'. This is not
only useful to normal users reading panic messages, but also for people
inspecting assembly and being confused by `slice_index_order_fail`
calls.
</content>
</entry>
<entry>
<title>Fix `Safety` docs for `from_raw_parts_mut`</title>
<updated>2020-07-17T17:47:25+00:00</updated>
<author>
<name>aticu</name>
<email>15schnic@gmail.com</email>
</author>
<published>2020-07-17T17:47:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4127ed1732f8fe55363df1b65b03b2e58d25fc7f'/>
<id>urn:sha1:4127ed1732f8fe55363df1b65b03b2e58d25fc7f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>apply bootstrap cfgs</title>
<updated>2020-07-16T23:36:49+00:00</updated>
<author>
<name>Mark Rousskov</name>
<email>mark.simulacrum@gmail.com</email>
</author>
<published>2020-07-16T13:12:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=647d9b525fcda07695809b851b4d6bce05b34e61'/>
<id>urn:sha1:647d9b525fcda07695809b851b4d6bce05b34e61</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #73986 - RalfJung:raw-slice-as-ptr, r=sfackler</title>
<updated>2020-07-14T14:39:00+00:00</updated>
<author>
<name>Manish Goregaokar</name>
<email>manishsmail@gmail.com</email>
</author>
<published>2020-07-14T14:39:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=79894dfbacf76ba7e670fc5bff2fa7f2f3c06597'/>
<id>urn:sha1:79894dfbacf76ba7e670fc5bff2fa7f2f3c06597</id>
<content type='text'>
add (unchecked) indexing methods to raw (and NonNull) slices

This complements the existing (unstable) `len` method. Unfortunately, for non-null slices, we cannot call this method `as_ptr` as that overlaps with the existing method of the same name.

If this looks reasonable to accept, I propose to reuse the https://github.com/rust-lang/rust/issues/71146 tracking issue and rename the feature get to `slice_ptr_methods` or so.

Cc @SimonSapin
Fixes https://github.com/rust-lang/rust/issues/60639
</content>
</entry>
<entry>
<title>Optimize is_ascii for &amp;str and &amp;[u8]</title>
<updated>2020-07-05T17:23:50+00:00</updated>
<author>
<name>Thom Chiovoloni</name>
<email>tchiovoloni@mozilla.com</email>
</author>
<published>2020-07-05T17:09:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=980d8e1a0b18e89129cce23bb5a46c6a498dc5d2'/>
<id>urn:sha1:980d8e1a0b18e89129cce23bb5a46c6a498dc5d2</id>
<content type='text'>
</content>
</entry>
</feed>
