File tree 2 files changed +24
-4
lines changed
2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,12 @@ use range_map::RangeMap;
44
44
#[ allow( unused_imports) ] // FIXME rustc bug https://github.com/rust-lang/rust/issues/53682
45
45
use helpers:: { ScalarExt , EvalContextExt as HelpersEvalContextExt } ;
46
46
use mono_hash_map:: MonoHashMap ;
47
- use stacked_borrows:: { EvalContextExt as StackedBorEvalContextExt , Borrow } ;
47
+ use stacked_borrows:: { EvalContextExt as StackedBorEvalContextExt } ;
48
48
49
+ // Used by priroda
50
+ pub use stacked_borrows:: { Borrow , Stacks , Mut as MutBorrow } ;
51
+
52
+ // Used by priroda
49
53
pub fn create_ecx < ' a , ' mir : ' a , ' tcx : ' mir > (
50
54
tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
51
55
main_id : DefId ,
Original file line number Diff line number Diff line change @@ -21,12 +21,20 @@ pub enum Mut {
21
21
22
22
impl Mut {
23
23
#[ inline( always) ]
24
- fn is_raw ( self ) -> bool {
24
+ pub fn is_raw ( self ) -> bool {
25
25
match self {
26
26
Mut :: Raw => true ,
27
27
_ => false ,
28
28
}
29
29
}
30
+
31
+ #[ inline( always) ]
32
+ pub fn is_uniq ( self ) -> bool {
33
+ match self {
34
+ Mut :: Uniq ( _) => true ,
35
+ _ => false ,
36
+ }
37
+ }
30
38
}
31
39
32
40
/// Information about any kind of borrow
@@ -40,9 +48,17 @@ pub enum Borrow {
40
48
41
49
impl Borrow {
42
50
#[ inline( always) ]
43
- fn is_uniq ( self ) -> bool {
51
+ pub fn is_uniq ( self ) -> bool {
52
+ match self {
53
+ Borrow :: Mut ( m) => m. is_uniq ( ) ,
54
+ _ => false ,
55
+ }
56
+ }
57
+
58
+ #[ inline( always) ]
59
+ pub fn is_frz ( self ) -> bool {
44
60
match self {
45
- Borrow :: Mut ( Mut :: Uniq ( _ ) ) => true ,
61
+ Borrow :: Frz ( _ ) => true ,
46
62
_ => false ,
47
63
}
48
64
}
You can’t perform that action at this time.
0 commit comments