File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
compiler/rustc_target/src/spec Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1413,6 +1413,20 @@ pub enum FramePointer {
14131413 MayOmit ,
14141414}
14151415
1416+ impl FramePointer {
1417+ /// It is intended that the "force frame pointer" transition is "one way"
1418+ /// so this convenience assures such if used
1419+ #[ inline]
1420+ pub fn ratchet ( & mut self , rhs : FramePointer ) -> FramePointer {
1421+ * self = match ( * self , rhs) {
1422+ ( FramePointer :: Always , _) | ( _, FramePointer :: Always ) => FramePointer :: Always ,
1423+ ( FramePointer :: NonLeaf , _) | ( _, FramePointer :: NonLeaf ) => FramePointer :: NonLeaf ,
1424+ _ => FramePointer :: MayOmit ,
1425+ } ;
1426+ * self
1427+ }
1428+ }
1429+
14161430impl FromStr for FramePointer {
14171431 type Err = ( ) ;
14181432 fn from_str ( s : & str ) -> Result < Self , ( ) > {
You can’t perform that action at this time.
0 commit comments