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.
Place
Operand
1 parent 2ed25f0 commit a64cd59Copy full SHA for a64cd59
src/librustc/mir/mod.rs
@@ -1993,6 +1993,15 @@ impl<'tcx> Operand<'tcx> {
1993
Operand::Move(place) => Operand::Copy(place),
1994
}
1995
1996
+
1997
+ /// Returns the `Place` that is the target of this `Operand`, or `None` if this `Operand` is a
1998
+ /// constant.
1999
+ pub fn place(&self) -> Option<&Place<'tcx>> {
2000
+ match self {
2001
+ Operand::Copy(place) | Operand::Move(place) => Some(place),
2002
+ Operand::Constant(_) => None,
2003
+ }
2004
2005
2006
2007
///////////////////////////////////////////////////////////////////////////
0 commit comments