Skip to content

Commit 651b25a

Browse files
committed
add fn core::convert::id<T>(x: T) -> T { x } to the prelude
1 parent 351fefb commit 651b25a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/libcore/prelude/v1.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ pub use ops::{Drop, Fn, FnMut, FnOnce};
2828
#[stable(feature = "core_prelude", since = "1.4.0")]
2929
#[doc(no_inline)]
3030
pub use mem::drop;
31+
#[unstable(feature = "convert_id_prelude", issue = "0")]
32+
#[inline]
33+
#[doc(no_inline)] pub use convert::id;
3134

3235
// Re-exported types and traits
3336
#[stable(feature = "core_prelude", since = "1.4.0")]

src/libstd/prelude/v1.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
// Re-exported functions
2424
#[stable(feature = "rust1", since = "1.0.0")]
2525
#[doc(no_inline)] pub use mem::drop;
26+
#[unstable(feature = "convert_id_prelude", issue = "0")]
27+
#[inline]
28+
#[doc(no_inline)] pub use convert::id;
2629

2730
// Re-exported types and traits
2831
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)