]> git.lizzy.rs Git - rust.git/commitdiff
add fn core::convert::id<T>(x: T) -> T { x } to the prelude
authorMazdak <twingoow@gmail.com>
Fri, 19 Jan 2018 00:28:25 +0000 (01:28 +0100)
committerMazdak <twingoow@gmail.com>
Fri, 19 Jan 2018 00:28:25 +0000 (01:28 +0100)
src/libcore/prelude/v1.rs
src/libstd/prelude/v1.rs

index d43496c387cb8ab668ab9b2562d21632e494d787..348cfc97b80cc1b7af5fe6f4cf6d9acc60115014 100644 (file)
@@ -28,6 +28,9 @@
 #[stable(feature = "core_prelude", since = "1.4.0")]
 #[doc(no_inline)]
 pub use mem::drop;
+#[unstable(feature = "convert_id_prelude", issue = "0")]
+#[inline]
+#[doc(no_inline)] pub use convert::id;
 
 // Re-exported types and traits
 #[stable(feature = "core_prelude", since = "1.4.0")]
index feedd4e1abe5f852a37738589ab4071e707616f5..190304a1d3e7962599c89e2a89c2e7c8924ce024 100644 (file)
@@ -23,6 +23,9 @@
 // Re-exported functions
 #[stable(feature = "rust1", since = "1.0.0")]
 #[doc(no_inline)] pub use mem::drop;
+#[unstable(feature = "convert_id_prelude", issue = "0")]
+#[inline]
+#[doc(no_inline)] pub use convert::id;
 
 // Re-exported types and traits
 #[stable(feature = "rust1", since = "1.0.0")]