rust/library/alloc/src
bors cedbe5c715 Auto merge of #113859 - Manishearth:vec-as-mut-ptr-stacked-borrow, r=dtolnay
Add note that Vec::as_mut_ptr() does not materialize a reference to the internal buffer

See discussion on https://github.com/thomcc/rust-typed-arena/issues/62 and [t-opsem](https://rust-lang.zulipchat.com/#narrow/stream/136281-t-opsem/topic/is.20this.20typed_arena.20code.20sound.20under.20stacked.2Ftree.20borrows.3F)

This method already does the correct thing here, but it is worth guaranteeing that it does so it can be used more freely in unsafe code without having to worry about potential Stacked/Tree Borrows violations. This moves one more unsafe usage pattern from the "very likely sound but technically not fully defined" box into "definitely sound", and currently our surface area of the latter is woefully small.

I'm not sure how best to word this, opening this PR as a way to start discussion.
2023-08-29 06:04:55 +00:00
..
alloc
boxed More IS_ZST in library 2023-04-21 16:29:27 -07:00
collections Avoid using ptr::Unique in LinkedList code 2023-07-30 11:21:24 -04:00
ffi fixed documentation of from<CString> for Rc<CStr>: Arc -> Rc 2023-07-02 10:07:52 +06:00
raw_vec
rc Introduce alloc::::UniqueRc 2023-06-19 12:24:06 -07:00
slice ignore core, alloc and test tests that require unwinding on panic=abort 2023-06-13 15:53:24 +02:00
sync
testing
vec Auto merge of #113859 - Manishearth:vec-as-mut-ptr-stacked-borrow, r=dtolnay 2023-08-29 06:04:55 +00:00
alloc.rs Rollup merge of #115280 - RalfJung:panic-cleanup-triple-backtrace, r=Amanieu 2023-08-28 08:13:59 +02:00
borrow.rs enable rust_2018_idioms for doctests 2023-05-07 00:12:29 +03:00
boxed.rs avoid transmuting Box when we can just cast raw pointers instead 2023-08-14 10:15:25 +02:00
fmt.rs enable rust_2018_idioms for doctests 2023-05-07 00:12:29 +03:00
lib.rs Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
macros.rs format, format_args: Make xref to std::fmt much more prominent 2023-08-28 11:54:40 +02:00
raw_vec.rs Eliminate ZST allocations in Box and Vec 2023-07-13 15:00:53 +01:00
rc.rs Replace version placeholders with 1.73.0 2023-08-22 06:57:00 -04:00
slice.rs Add suggestion for some #[deprecated] items 2023-08-21 12:51:51 +03:00
str.rs [nit] Fix a comment typo. 2023-08-15 14:26:14 -05:00
string.rs string.rs: remove "Basic usage" text 2023-08-02 11:17:57 +02:00
sync.rs Replace version placeholders with 1.73.0 2023-08-22 06:57:00 -04:00
task.rs Updating Wake example to use new 'pin!' macro 2023-04-25 13:50:50 +02:00
tests.rs