We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23c76ff commit b03d3dcCopy full SHA for b03d3dc
src/libstd/io/mod.rs
@@ -374,11 +374,11 @@ where
374
// FIXME(danielhenrymantilla): #42788
375
//
376
// - This creates a (mut) reference to a slice of
377
- // _uninitialized integers_.
+ // _uninitialized_ integers, which is **undefined behavior**
378
379
- // - This having defined behavior is **unstable**:
380
- // it could become UB in the future,
381
- // 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;
382
g.buf.reserve(reservation_size(r));
383
let capacity = g.buf.capacity();
384
g.buf.set_len(capacity);
0 commit comments