@@ -5,7 +5,7 @@ use rustc_middle::mir::coverage::{
55/// Must match the layout of `LLVMRustCounterKind`.
66#[ derive( Copy , Clone , Debug ) ]
77#[ repr( C ) ]
8- pub enum CounterKind {
8+ pub ( crate ) enum CounterKind {
99 Zero = 0 ,
1010 CounterValueReference = 1 ,
1111 Expression = 2 ,
@@ -25,9 +25,9 @@ pub enum CounterKind {
2525/// Must match the layout of `LLVMRustCounter`.
2626#[ derive( Copy , Clone , Debug ) ]
2727#[ repr( C ) ]
28- pub struct Counter {
28+ pub ( crate ) struct Counter {
2929 // Important: The layout (order and types of fields) must match its C++ counterpart.
30- pub kind : CounterKind ,
30+ pub ( crate ) kind : CounterKind ,
3131 id : u32 ,
3232}
3333
@@ -36,7 +36,7 @@ impl Counter {
3636 pub ( crate ) const ZERO : Self = Self { kind : CounterKind :: Zero , id : 0 } ;
3737
3838 /// 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 {
4040 Self { kind : CounterKind :: CounterValueReference , id : counter_id. as_u32 ( ) }
4141 }
4242
@@ -59,7 +59,7 @@ impl Counter {
5959/// Must match the layout of `LLVMRustCounterExprKind`.
6060#[ derive( Copy , Clone , Debug ) ]
6161#[ repr( C ) ]
62- pub enum ExprKind {
62+ pub ( crate ) enum ExprKind {
6363 Subtract = 0 ,
6464 Add = 1 ,
6565}
@@ -69,10 +69,10 @@ pub enum ExprKind {
6969/// Must match the layout of `LLVMRustCounterExpression`.
7070#[ derive( Copy , Clone , Debug ) ]
7171#[ 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 ,
7676}
7777
7878/// Corresponds to enum `llvm::coverage::CounterMappingRegion::RegionKind`.
@@ -199,7 +199,7 @@ mod mcdc {
199199/// Must match the layout of `LLVMRustCounterMappingRegion`.
200200#[ derive( Copy , Clone , Debug ) ]
201201#[ repr( C ) ]
202- pub struct CounterMappingRegion {
202+ pub ( crate ) struct CounterMappingRegion {
203203 /// The counter type and type-dependent counter data, if any.
204204 counter : Counter ,
205205
0 commit comments