Skip to content

Commit 5990249

Browse files
committed
core: Stabilize prelude::v1
This commit stabilizes the prelude::v1 module of libcore after verifying that it's a subset of the prelude of the standard library with the addition of a few extension traits.
1 parent 0c849de commit 5990249

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

src/libcore/prelude/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@
1010

1111
//! The libcore prelude
1212
13+
#![stable(feature = "core_prelude", since = "1.4.0")]
14+
1315
pub mod v1;

src/libcore/prelude/v1.rs

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,26 @@
1414
//! well. This module is imported by default when `#![no_std]` is used in the
1515
//! same manner as the standard library's prelude.
1616
17-
#![unstable(feature = "core_prelude",
18-
reason = "the libcore prelude has not been scrutinized and \
19-
stabilized yet",
20-
issue = "27701")]
17+
#![stable(feature = "core_prelude", since = "1.4.0")]
2118

2219
// Reexported core operators
23-
pub use marker::{Copy, Send, Sized, Sync};
24-
pub use ops::{Drop, Fn, FnMut, FnOnce};
20+
#[doc(no_inline)] pub use marker::{Copy, Send, Sized, Sync};
21+
#[doc(no_inline)] pub use ops::{Drop, Fn, FnMut, FnOnce};
2522

2623
// Reexported functions
27-
pub use mem::drop;
24+
#[doc(no_inline)] pub use mem::drop;
2825

2926
// Reexported types and traits
30-
pub use char::CharExt;
31-
pub use clone::Clone;
32-
pub use cmp::{PartialEq, PartialOrd, Eq, Ord};
33-
pub use convert::{AsRef, AsMut, Into, From};
34-
pub use default::Default;
35-
pub use iter::IntoIterator;
36-
pub use iter::{Iterator, DoubleEndedIterator, Extend, ExactSizeIterator};
37-
pub use option::Option::{self, Some, None};
38-
pub use result::Result::{self, Ok, Err};
39-
pub use slice::SliceExt;
40-
pub use str::StrExt;
27+
#[doc(no_inline)] pub use clone::Clone;
28+
#[doc(no_inline)] pub use cmp::{PartialEq, PartialOrd, Eq, Ord};
29+
#[doc(no_inline)] pub use convert::{AsRef, AsMut, Into, From};
30+
#[doc(no_inline)] pub use default::Default;
31+
#[doc(no_inline)] pub use iter::{Iterator, Extend, IntoIterator};
32+
#[doc(no_inline)] pub use iter::{DoubleEndedIterator, ExactSizeIterator};
33+
#[doc(no_inline)] pub use option::Option::{self, Some, None};
34+
#[doc(no_inline)] pub use result::Result::{self, Ok, Err};
35+
36+
// Reexported extension traits for primitive types
37+
#[doc(no_inline)] pub use slice::SliceExt;
38+
#[doc(no_inline)] pub use str::StrExt;
39+
#[doc(no_inline)] pub use char::CharExt;

0 commit comments

Comments
 (0)