Skip to content

Commit b03d3dc

Browse files
author
Daniel Henry-Mantilla
committed
Changed comment to better reflect std's exceptional situation
1 parent 23c76ff commit b03d3dc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libstd/io/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -374,11 +374,11 @@ where
374374
// FIXME(danielhenrymantilla): #42788
375375
//
376376
// - This creates a (mut) reference to a slice of
377-
// _uninitialized integers_.
377+
// _uninitialized_ integers, which is **undefined behavior**
378378
//
379-
// - This having defined behavior is **unstable**:
380-
// it could become UB in the future,
381-
// at which point it would have be changed.
379+
// - Only the standard library gets to soundly "ignore" this,
380+
// based on its privileged knowledge of unstable rustc
381+
// internals;
382382
g.buf.reserve(reservation_size(r));
383383
let capacity = g.buf.capacity();
384384
g.buf.set_len(capacity);

0 commit comments

Comments
 (0)