mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-08 09:38:26 +03:00
Changed comment to better reflect std's exceptional situation
This commit is contained in:
@@ -374,11 +374,11 @@ fn read_to_end_with_reservation<R, F>(
|
||||
// FIXME(danielhenrymantilla): #42788
|
||||
//
|
||||
// - This creates a (mut) reference to a slice of
|
||||
// _uninitialized integers_.
|
||||
// _uninitialized_ integers, which is **undefined behavior**
|
||||
//
|
||||
// - This having defined behavior is **unstable**:
|
||||
// it could become UB in the future,
|
||||
// at which point it would have be changed.
|
||||
// - Only the standard library gets to soundly "ignore" this,
|
||||
// based on its privileged knowledge of unstable rustc
|
||||
// internals;
|
||||
g.buf.reserve(reservation_size(r));
|
||||
let capacity = g.buf.capacity();
|
||||
g.buf.set_len(capacity);
|
||||
|
||||
Reference in New Issue
Block a user