Skip to content

Commit 5b795cf

Browse files
committed
Reformat std prelude source to show it is the sum of core and alloc preludes
1 parent b842177 commit 5b795cf

File tree

1 file changed

+42
-16
lines changed

1 file changed

+42
-16
lines changed

src/libstd/prelude/v1.rs

+42-16
Original file line numberDiff line numberDiff line change
@@ -12,42 +12,68 @@
1212
//!
1313
//! See the [module-level documentation](../index.html) for more.
1414
15+
16+
1517
#![stable(feature = "rust1", since = "1.0.0")]
1618

1719
// Re-exported core operators
1820
#[stable(feature = "rust1", since = "1.0.0")]
19-
#[doc(no_inline)] pub use marker::{Copy, Send, Sized, Sync};
21+
#[doc(no_inline)]
22+
pub use marker::{Copy, Send, Sized, Sync};
2023
#[stable(feature = "rust1", since = "1.0.0")]
21-
#[doc(no_inline)] pub use ops::{Drop, Fn, FnMut, FnOnce};
24+
#[doc(no_inline)]
25+
pub use ops::{Drop, Fn, FnMut, FnOnce};
2226

2327
// Re-exported functions
2428
#[stable(feature = "rust1", since = "1.0.0")]
25-
#[doc(no_inline)] pub use mem::drop;
29+
#[doc(no_inline)]
30+
pub use mem::drop;
2631

2732
// Re-exported types and traits
2833
#[stable(feature = "rust1", since = "1.0.0")]
29-
#[doc(no_inline)] pub use boxed::Box;
34+
#[doc(no_inline)]
35+
pub use clone::Clone;
3036
#[stable(feature = "rust1", since = "1.0.0")]
31-
#[doc(no_inline)] pub use borrow::ToOwned;
37+
#[doc(no_inline)]
38+
pub use cmp::{PartialEq, PartialOrd, Eq, Ord};
3239
#[stable(feature = "rust1", since = "1.0.0")]
33-
#[doc(no_inline)] pub use clone::Clone;
40+
#[doc(no_inline)]
41+
pub use convert::{AsRef, AsMut, Into, From};
3442
#[stable(feature = "rust1", since = "1.0.0")]
35-
#[doc(no_inline)] pub use cmp::{PartialEq, PartialOrd, Eq, Ord};
43+
#[doc(no_inline)]
44+
pub use default::Default;
3645
#[stable(feature = "rust1", since = "1.0.0")]
37-
#[doc(no_inline)] pub use convert::{AsRef, AsMut, Into, From};
46+
#[doc(no_inline)]
47+
pub use iter::{Iterator, Extend, IntoIterator};
3848
#[stable(feature = "rust1", since = "1.0.0")]
39-
#[doc(no_inline)] pub use default::Default;
49+
#[doc(no_inline)]
50+
pub use iter::{DoubleEndedIterator, ExactSizeIterator};
4051
#[stable(feature = "rust1", since = "1.0.0")]
41-
#[doc(no_inline)] pub use iter::{Iterator, Extend, IntoIterator};
52+
#[doc(no_inline)]
53+
pub use option::Option::{self, Some, None};
4254
#[stable(feature = "rust1", since = "1.0.0")]
43-
#[doc(no_inline)] pub use iter::{DoubleEndedIterator, ExactSizeIterator};
55+
#[doc(no_inline)]
56+
pub use result::Result::{self, Ok, Err};
57+
58+
59+
// The file so far is equivalent to src/libcore/prelude/v1.rs,
60+
// and below to src/liballoc/prelude.rs.
61+
// Those files are duplicated rather than using glob imports
62+
// because we want docs to show these re-exports as pointing to within `std`.
63+
64+
4465
#[stable(feature = "rust1", since = "1.0.0")]
45-
#[doc(no_inline)] pub use option::Option::{self, Some, None};
66+
#[doc(no_inline)]
67+
pub use boxed::Box;
4668
#[stable(feature = "rust1", since = "1.0.0")]
47-
#[doc(no_inline)] pub use result::Result::{self, Ok, Err};
69+
#[doc(no_inline)]
70+
pub use borrow::ToOwned;
4871
#[stable(feature = "rust1", since = "1.0.0")]
49-
#[doc(no_inline)] pub use slice::SliceConcatExt;
72+
#[doc(no_inline)]
73+
pub use slice::SliceConcatExt;
5074
#[stable(feature = "rust1", since = "1.0.0")]
51-
#[doc(no_inline)] pub use string::{String, ToString};
75+
#[doc(no_inline)]
76+
pub use string::{String, ToString};
5277
#[stable(feature = "rust1", since = "1.0.0")]
53-
#[doc(no_inline)] pub use vec::Vec;
78+
#[doc(no_inline)]
79+
pub use vec::Vec;

0 commit comments

Comments
 (0)