Skip to content

Commit 1a1acdc

Browse files
committed
Align contents of prelude/v1.rs in libcore and libstd
1 parent 1b4c921 commit 1a1acdc

File tree

2 files changed

+23
-26
lines changed

2 files changed

+23
-26
lines changed

src/libcore/prelude/v1.rs

+11-22
Original file line numberDiff line numberDiff line change
@@ -18,39 +18,28 @@
1818

1919
// Re-exported core operators
2020
#[stable(feature = "core_prelude", since = "1.4.0")]
21-
#[doc(no_inline)]
22-
pub use marker::{Copy, Send, Sized, Sync};
21+
#[doc(no_inline)] pub use marker::{Copy, Send, Sized, Sync};
2322
#[stable(feature = "core_prelude", since = "1.4.0")]
24-
#[doc(no_inline)]
25-
pub use ops::{Drop, Fn, FnMut, FnOnce};
23+
#[doc(no_inline)] pub use ops::{Drop, Fn, FnMut, FnOnce};
2624

2725
// Re-exported functions
2826
#[stable(feature = "core_prelude", since = "1.4.0")]
29-
#[doc(no_inline)]
30-
pub use mem::drop;
27+
#[doc(no_inline)] pub use mem::drop;
3128

3229
// Re-exported types and traits
3330
#[stable(feature = "core_prelude", since = "1.4.0")]
34-
#[doc(no_inline)]
35-
pub use clone::Clone;
31+
#[doc(no_inline)] pub use clone::Clone;
3632
#[stable(feature = "core_prelude", since = "1.4.0")]
37-
#[doc(no_inline)]
38-
pub use cmp::{PartialEq, PartialOrd, Eq, Ord};
33+
#[doc(no_inline)] pub use cmp::{PartialEq, PartialOrd, Eq, Ord};
3934
#[stable(feature = "core_prelude", since = "1.4.0")]
40-
#[doc(no_inline)]
41-
pub use convert::{AsRef, AsMut, Into, From};
35+
#[doc(no_inline)] pub use convert::{AsRef, AsMut, Into, From};
4236
#[stable(feature = "core_prelude", since = "1.4.0")]
43-
#[doc(no_inline)]
44-
pub use default::Default;
37+
#[doc(no_inline)] pub use default::Default;
4538
#[stable(feature = "core_prelude", since = "1.4.0")]
46-
#[doc(no_inline)]
47-
pub use iter::{Iterator, Extend, IntoIterator};
39+
#[doc(no_inline)] pub use iter::{Iterator, Extend, IntoIterator};
4840
#[stable(feature = "core_prelude", since = "1.4.0")]
49-
#[doc(no_inline)]
50-
pub use iter::{DoubleEndedIterator, ExactSizeIterator};
41+
#[doc(no_inline)] pub use iter::{DoubleEndedIterator, ExactSizeIterator};
5142
#[stable(feature = "core_prelude", since = "1.4.0")]
52-
#[doc(no_inline)]
53-
pub use option::Option::{self, Some, None};
43+
#[doc(no_inline)] pub use option::Option::{self, Some, None};
5444
#[stable(feature = "core_prelude", since = "1.4.0")]
55-
#[doc(no_inline)]
56-
pub use result::Result::{self, Ok, Err};
45+
#[doc(no_inline)] pub use result::Result::{self, Ok, Err};

src/libstd/prelude/v1.rs

+12-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
1112
//! The first version of the prelude of The Rust Standard Library.
1213
//!
1314
//! See the [module-level documentation](../index.html) for more.
1415
16+
1517
#![stable(feature = "rust1", since = "1.0.0")]
1618

1719
// Re-exported core operators
@@ -26,10 +28,6 @@
2628

2729
// Re-exported types and traits
2830
#[stable(feature = "rust1", since = "1.0.0")]
29-
#[doc(no_inline)] pub use boxed::Box;
30-
#[stable(feature = "rust1", since = "1.0.0")]
31-
#[doc(no_inline)] pub use borrow::ToOwned;
32-
#[stable(feature = "rust1", since = "1.0.0")]
3331
#[doc(no_inline)] pub use clone::Clone;
3432
#[stable(feature = "rust1", since = "1.0.0")]
3533
#[doc(no_inline)] pub use cmp::{PartialEq, PartialOrd, Eq, Ord};
@@ -45,6 +43,16 @@
4543
#[doc(no_inline)] pub use option::Option::{self, Some, None};
4644
#[stable(feature = "rust1", since = "1.0.0")]
4745
#[doc(no_inline)] pub use result::Result::{self, Ok, Err};
46+
47+
48+
// Contents so far are equivalent to src/libcore/prelude/v1.rs
49+
50+
51+
// Re-exported types and traits that involve memory allocation
52+
#[stable(feature = "rust1", since = "1.0.0")]
53+
#[doc(no_inline)] pub use boxed::Box;
54+
#[stable(feature = "rust1", since = "1.0.0")]
55+
#[doc(no_inline)] pub use borrow::ToOwned;
4856
#[stable(feature = "rust1", since = "1.0.0")]
4957
#[doc(no_inline)] pub use slice::SliceConcatExt;
5058
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)