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 99fa2e3 commit 8293014Copy full SHA for 8293014
core/src/intrinsics/mir.rs
@@ -82,6 +82,12 @@ define!("mir_retag_raw", fn RetagRaw<T>(place: T));
82
define!("mir_move", fn Move<T>(place: T) -> T);
83
define!("mir_static", fn Static<T>(s: T) -> &'static T);
84
define!("mir_static_mut", fn StaticMut<T>(s: T) -> *mut T);
85
+define!(
86
+ "mir_discriminant",
87
+ /// Gets the discriminant of a place.
88
+ fn Discriminant<T>(place: T) -> <T as ::core::marker::DiscriminantKind>::Discriminant
89
+);
90
+define!("mir_set_discriminant", fn SetDiscriminant<T>(place: T, index: u32));
91
92
/// Convenience macro for generating custom MIR.
93
///
0 commit comments