@@ -5,7 +5,7 @@ use rustc_middle::mir::coverage::{
5
5
/// Must match the layout of `LLVMRustCounterKind`.
6
6
#[ derive( Copy , Clone , Debug ) ]
7
7
#[ repr( C ) ]
8
- pub enum CounterKind {
8
+ pub ( crate ) enum CounterKind {
9
9
Zero = 0 ,
10
10
CounterValueReference = 1 ,
11
11
Expression = 2 ,
@@ -25,9 +25,9 @@ pub enum CounterKind {
25
25
/// Must match the layout of `LLVMRustCounter`.
26
26
#[ derive( Copy , Clone , Debug ) ]
27
27
#[ repr( C ) ]
28
- pub struct Counter {
28
+ pub ( crate ) struct Counter {
29
29
// Important: The layout (order and types of fields) must match its C++ counterpart.
30
- pub kind : CounterKind ,
30
+ pub ( crate ) kind : CounterKind ,
31
31
id : u32 ,
32
32
}
33
33
@@ -36,7 +36,7 @@ impl Counter {
36
36
pub ( crate ) const ZERO : Self = Self { kind : CounterKind :: Zero , id : 0 } ;
37
37
38
38
/// Constructs a new `Counter` of kind `CounterValueReference`.
39
- pub fn counter_value_reference ( counter_id : CounterId ) -> Self {
39
+ pub ( crate ) fn counter_value_reference ( counter_id : CounterId ) -> Self {
40
40
Self { kind : CounterKind :: CounterValueReference , id : counter_id. as_u32 ( ) }
41
41
}
42
42
@@ -59,7 +59,7 @@ impl Counter {
59
59
/// Must match the layout of `LLVMRustCounterExprKind`.
60
60
#[ derive( Copy , Clone , Debug ) ]
61
61
#[ repr( C ) ]
62
- pub enum ExprKind {
62
+ pub ( crate ) enum ExprKind {
63
63
Subtract = 0 ,
64
64
Add = 1 ,
65
65
}
@@ -69,10 +69,10 @@ pub enum ExprKind {
69
69
/// Must match the layout of `LLVMRustCounterExpression`.
70
70
#[ derive( Copy , Clone , Debug ) ]
71
71
#[ repr( C ) ]
72
- pub struct CounterExpression {
73
- pub kind : ExprKind ,
74
- pub lhs : Counter ,
75
- pub rhs : Counter ,
72
+ pub ( crate ) struct CounterExpression {
73
+ pub ( crate ) kind : ExprKind ,
74
+ pub ( crate ) lhs : Counter ,
75
+ pub ( crate ) rhs : Counter ,
76
76
}
77
77
78
78
/// Corresponds to enum `llvm::coverage::CounterMappingRegion::RegionKind`.
@@ -199,7 +199,7 @@ mod mcdc {
199
199
/// Must match the layout of `LLVMRustCounterMappingRegion`.
200
200
#[ derive( Copy , Clone , Debug ) ]
201
201
#[ repr( C ) ]
202
- pub struct CounterMappingRegion {
202
+ pub ( crate ) struct CounterMappingRegion {
203
203
/// The counter type and type-dependent counter data, if any.
204
204
counter : Counter ,
205
205
0 commit comments