File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
libc-test/tests/style_lib Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,12 @@ use syn::visit::{
5151use syn:: Token ;
5252
5353const ALLOWED_REPEATED_MACROS : & [ & str ] = & [ "s" , "s_no_extra_traits" , "s_paren" ] ;
54+ const ALLOWED_POSITIVE_S_CFGS : & [ & str ] = & [
55+ "gnu_file_offset_bits64" ,
56+ "gnu_time_bits64" ,
57+ "musl32_time64" ,
58+ "musl_v1_2_3" ,
59+ ] ;
5460
5561pub type Error = Box < dyn std:: error:: Error > ;
5662pub type Result < T > = std:: result:: Result < T , Error > ;
@@ -285,6 +291,8 @@ impl StyleChecker {
285291 if !meta_str. starts_with ( "not" )
286292 && !meta_str. starts_with ( "any" )
287293 && !meta_str. starts_with ( "all" )
294+ && !meta_str. starts_with ( "target_endian" )
295+ && !ALLOWED_POSITIVE_S_CFGS . contains ( & meta_str. as_str ( ) )
288296 {
289297 self . error (
290298 "positive #[cfg] for s! macro" . to_string ( ) ,
You can’t perform that action at this time.
0 commit comments