We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2217b7 commit 71187b7Copy full SHA for 71187b7
src/libcore/convert.rs
@@ -104,8 +104,9 @@
104
/// assert_eq!(vec![1, 3], filtered);
105
/// ```
106
#[unstable(feature = "convert_id", issue = "0")]
107
+#[rustc_const_unstable(feature = "const_convert_id")]
108
#[inline]
-pub fn identity<T>(x: T) -> T { x }
109
+pub const fn identity<T>(x: T) -> T { x }
110
111
/// A cheap reference-to-reference conversion. Used to convert a value to a
112
/// reference value within generic code.
0 commit comments