@@ -184,7 +184,7 @@ impl std::fmt::Display for MemNodes {
184184}
185185
186186macro_rules! impl_read_pressure {
187- ( $fn: ident, $e: expr , $typ: tt, FullPressureSupported ) => {
187+ ( $fn: ident, $e: expr_2021 , $typ: tt, FullPressureSupported ) => {
188188 /// Read $typ
189189 pub fn $fn( & self ) -> Result <$typ> {
190190 let ( some_pressure, full_pressure_opt, file_name) =
@@ -197,7 +197,7 @@ macro_rules! impl_read_pressure {
197197 } )
198198 }
199199 } ;
200- ( $fn: ident, $e: expr , $typ: tt, FullPressureMaybeSupported ) => {
200+ ( $fn: ident, $e: expr_2021 , $typ: tt, FullPressureMaybeSupported ) => {
201201 /// Read $typ
202202 pub fn $fn( & self ) -> Result <$typ> {
203203 let ( some_pressure, full_pressure_opt, _) = impl_read_pressure!( Internal , & self , $e) ;
@@ -207,7 +207,7 @@ macro_rules! impl_read_pressure {
207207 } )
208208 }
209209 } ;
210- ( Internal , $self: expr , $e: expr ) => { {
210+ ( Internal , $self: expr_2021 , $e: expr_2021 ) => { {
211211 let file_name = concat!( $e, ".pressure" ) ;
212212 let mut pressure = PressureMetrics :: read( $self, file_name) ?;
213213 (
@@ -221,7 +221,7 @@ macro_rules! impl_read_pressure {
221221}
222222
223223macro_rules! parse_and_set_fields {
224- ( $struct: expr ; $key: expr ; $value: expr ; [ $( $field: ident, ) + ] ) => (
224+ ( $struct: expr_2021 ; $key: expr_2021 ; $value: expr_2021 ; [ $( $field: ident, ) + ] ) => (
225225 match $key {
226226 $( stringify!( $field) => $struct. $field = Some ( $value) , ) *
227227 _ => ( ) ,
@@ -656,7 +656,7 @@ trait KVRead: Sized {
656656// corresponding field is left as `None`. If lines include fields that
657657// are not listed, they are ignored.
658658macro_rules! key_values_format {
659- ( $struct: ident; $file: expr ; [ $( $field: ident ) ,+ ] ) => (
659+ ( $struct: ident; $file: expr_2021 ; [ $( $field: ident ) ,+ ] ) => (
660660 impl KVRead for $struct {
661661 fn read( r: & CgroupReader ) -> Result <$struct> {
662662 let mut s = $struct:: default ( ) ;
@@ -767,7 +767,7 @@ struct AllowsEmpty(bool);
767767struct AllowsPressureEOpNotSupp ( bool ) ;
768768
769769macro_rules! name_key_equal_value_format {
770- ( $struct: ident; $allows_empty: expr ; $allows_pressure_eopnotsupp: expr ; [ $( $field: ident, ) + ] ) => (
770+ ( $struct: ident; $allows_empty: expr_2021 ; $allows_pressure_eopnotsupp: expr_2021 ; [ $( $field: ident, ) + ] ) => (
771771 impl NameKVRead for $struct {
772772 fn read<P : AsRef <Path > + AsPath + Clone >( r: & CgroupReader , file_name: P ) -> Result <BTreeMap <String , $struct>> {
773773 let mut map = BTreeMap :: new( ) ;
0 commit comments