Skip to content

Commit bd395d2

Browse files
committed
Import fixes.
1 parent 58150ac commit bd395d2

File tree

10 files changed

+29
-23
lines changed

10 files changed

+29
-23
lines changed

library/alloc/src/io/buffered/bufreader.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
use crate::cmp;
1+
use core::cmp;
22
use crate::fmt;
33
use crate::io::{self, BufRead, Initializer, IoSliceMut, Read, Seek, SeekFrom, DEFAULT_BUF_SIZE};
4+
use crate::{boxed::Box, vec::Vec};
45

56
/// The `BufReader<R>` struct adds buffering to any reader.
67
///

library/alloc/src/io/buffered/bufwriter.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use crate::io::{
44
self, Error, ErrorKind, IntoInnerError, IoSlice, Seek, SeekFrom, Write, DEFAULT_BUF_SIZE,
55
};
66
use crate::mem;
7+
use crate::vec::Vec;
78

89
/// Wraps a writer and buffers its output.
910
///

library/alloc/src/io/buffered/linewritershim.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::io::{self, BufWriter, IoSlice, Write};
2-
use crate::memchr;
2+
use core::slice::memchr;
33

44
/// Private helper struct for implementing the line-buffered writing logic.
55
/// This shim temporarily wraps a BufWriter, and uses its internals to

library/alloc/src/io/buffered/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ mod linewritershim;
88
#[cfg(test)]
99
mod tests;
1010

11-
use crate::error;
1211
use crate::fmt;
1312
use crate::io::Error;
1413

library/alloc/src/io/cursor.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ mod tests;
33

44
use crate::io::prelude::*;
55

6-
use crate::cmp;
6+
use core::cmp;
77
use crate::io::{self, Error, ErrorKind, Initializer, IoSlice, IoSliceMut, SeekFrom};
88

99
use core::convert::TryInto;
10+
use crate::{vec::Vec, boxed::Box};
1011

1112
/// A `Cursor` wraps an in-memory buffer and provides it with a
1213
/// [`Seek`] implementation.

library/alloc/src/io/error.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
#[cfg(test)]
22
mod tests;
33

4-
use crate::convert::From;
5-
use crate::error;
6-
use crate::fmt;
7-
use crate::result;
8-
use crate::sys;
4+
use core::convert::From;
5+
use core::fmt;
6+
use core::result;
7+
use crate::{boxed::Box, string::String};
98

109
/// A specialized [`Result`] type for I/O operations.
1110
///

library/alloc/src/io/impls.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#[cfg(test)]
22
mod tests;
33

4-
use crate::cmp;
5-
use crate::fmt;
4+
use core::cmp;
5+
use core::fmt;
66
use crate::io::{
77
self, BufRead, Error, ErrorKind, Initializer, IoSlice, IoSliceMut, Read, Seek, SeekFrom, Write,
88
};
9-
use crate::mem;
9+
use core::mem;
10+
use crate::{vec::Vec, boxed::Box, string::String};
1011

1112
// =============================================================================
1213
// Forwarding implementations

library/alloc/src/io/mod.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -248,17 +248,19 @@
248248
249249
#![stable(feature = "rust1", since = "1.0.0")]
250250

251+
use core::{marker::PhantomData};
252+
use core::ctypes::{c_void, iovec, iov_len_t};
253+
251254
#[cfg(test)]
252255
mod tests;
253256

254-
use crate::cmp;
255-
use crate::fmt;
256-
use crate::memchr;
257-
use crate::ops::{Deref, DerefMut};
258-
use crate::ptr;
259-
use crate::slice;
260-
use crate::str;
261-
use crate::sys;
257+
use core::cmp;
258+
use core::fmt;
259+
use core::slice::memchr;
260+
use core::ops::{Deref, DerefMut};
261+
use core::ptr;
262+
use core::slice;
263+
use core::str;
262264

263265
#[stable(feature = "rust1", since = "1.0.0")]
264266
pub use self::buffered::IntoInnerError;
@@ -288,8 +290,8 @@ mod cursor;
288290
mod error;
289291
mod impls;
290292
pub mod prelude;
291-
mod stdio;
292293
mod util;
294+
use crate::{vec::Vec, string::String};
293295

294296
const DEFAULT_BUF_SIZE: usize = crate::sys_common::io::DEFAULT_BUF_SIZE;
295297

library/alloc/src/io/util.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
#[cfg(test)]
44
mod tests;
55

6-
use crate::fmt;
7-
use crate::io::{self, BufRead, Initializer, IoSlice, IoSliceMut, Read, Seek, SeekFrom, Write};
6+
use core::fmt;
7+
use crate::io::{self, BufRead, ErrorKind, Initializer, IoSlice, IoSliceMut, Read, Seek, SeekFrom, Write};
8+
use core::mem::MaybeUninit;
89

910
/// A reader which is always at EOF.
1011
///

library/alloc/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ pub mod task;
184184
#[cfg(test)]
185185
mod tests;
186186
pub mod vec;
187+
pub mod io;
187188

188189
#[doc(hidden)]
189190
#[unstable(feature = "liballoc_internals", issue = "none", reason = "implementation detail")]

0 commit comments

Comments
 (0)