We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 815dec9 commit 23c76ffCopy full SHA for 23c76ff
src/libstd/io/mod.rs
@@ -371,6 +371,14 @@ where
371
loop {
372
if g.len == g.buf.len() {
373
unsafe {
374
+ // FIXME(danielhenrymantilla): #42788
375
+ //
376
+ // - This creates a (mut) reference to a slice of
377
+ // _uninitialized integers_.
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.
382
g.buf.reserve(reservation_size(r));
383
let capacity = g.buf.capacity();
384
g.buf.set_len(capacity);
0 commit comments