@@ -548,18 +548,6 @@ macro_rules! lazy_static_include_bytes {
548548
549549// TODO -----include_array START-----
550550
551- #[ doc( hidden) ]
552- #[ macro_export]
553- macro_rules! lazy_static_include_array_impl {
554- ( $name: ident ) => {
555- impl :: std:: fmt:: Debug for $name {
556- fn fmt( & self , f: & mut :: std:: fmt:: Formatter ) -> :: std:: fmt:: Result {
557- :: std:: fmt:: Debug :: fmt( & ( * $name) [ ..] , f)
558- }
559- }
560- }
561- }
562-
563551#[ cfg( not( debug_assertions) ) ]
564552#[ doc( hidden) ]
565553#[ macro_export]
@@ -697,7 +685,7 @@ macro_rules! lazy_static_include_array_inner_b {
697685 }
698686
699687 if p != $s {
700- panic!( "incorrect array, file: {}" , path) ;
688+ panic!( "incorrect length, {} != {}, file: {}" , p , $s , path) ;
701689 }
702690
703691 result
@@ -797,7 +785,7 @@ macro_rules! lazy_static_include_array_inner_c {
797785 }
798786
799787 if p != $s {
800- panic!( "incorrect array, file: {}" , path) ;
788+ panic!( "incorrect length, {} != {}, file: {}" , p , $s , path) ;
801789 }
802790
803791 result
@@ -891,7 +879,7 @@ macro_rules! lazy_static_include_array_inner_s {
891879 }
892880
893881 if result. len( ) != $s {
894- panic!( "incorrect array, file: {}" , path) ;
882+ panic!( "incorrect length, {} != {}, file: {}" , result . len ( ) , $s , path) ;
895883 }
896884
897885 let mut result_str = [ "" ; $s] ;
@@ -1019,7 +1007,7 @@ macro_rules! lazy_static_include_array_inner_u {
10191007 }
10201008
10211009 if p != $s {
1022- panic!( "incorrect array, file: {}" , path) ;
1010+ panic!( "incorrect length, {} != {}, file: {}" , p , $s , path) ;
10231011 }
10241012
10251013 result
@@ -1173,7 +1161,7 @@ macro_rules! lazy_static_include_array_inner_if {
11731161 }
11741162
11751163 if p != $s {
1176- panic!( "incorrect array, file: {}" , path) ;
1164+ panic!( "incorrect length, {} != {}, file: {}" , p , $s , path) ;
11771165 }
11781166
11791167 result
@@ -1294,57 +1282,41 @@ macro_rules! lazy_static_include_array {
12941282 lazy_static! {
12951283 static ref $name: [ & ' static str ; $s] = lazy_static_include_array_inner!( $name: [ & ' static str ; $s] , $path) ;
12961284 }
1297-
1298- lazy_static_include_array_impl!( $name) ;
12991285 } ;
13001286 ( $name: ident: [ & ' static str ; $s: expr] , $path: expr, $( $paths: expr) , + ) => {
13011287 lazy_static! {
13021288 static ref $name: Vec <[ & ' static str ; $s] > = lazy_static_include_array_inner!( $name: [ & ' static str ; $s] , $path $( , $paths) +) ;
13031289 }
1304-
1305- lazy_static_include_array_impl!( $name) ;
13061290 } ;
13071291 ( pub $name: ident: [ & ' static str ; $s: expr] , $path: expr ) => {
13081292 lazy_static! {
13091293 pub static ref $name: [ & ' static str ; $s] = lazy_static_include_array_inner!( $name: [ & ' static str ; $s] , $path) ;
13101294 }
1311-
1312- lazy_static_include_array_impl!( $name) ;
13131295 } ;
13141296 ( pub $name: ident: [ & ' static str ; $s: expr] , $path: expr, $( $paths: expr) , + ) => {
13151297 lazy_static! {
13161298 pub static ref $name: Vec <[ & ' static str ; $s] > = lazy_static_include_array_inner!( $name: [ & ' static str ; $s] , $path $( , $paths) +) ;
13171299 }
1318-
1319- lazy_static_include_array_impl!( $name) ;
13201300 } ;
13211301 ( $name: ident: [ $t: ident; $s: expr] , $path: expr ) => {
13221302 lazy_static! {
13231303 static ref $name: [ $t; $s] = lazy_static_include_array_inner!( $name: [ $t; $s] , $path) ;
13241304 }
1325-
1326- lazy_static_include_array_impl!( $name) ;
13271305 } ;
13281306 ( $name: ident: [ $t: ident; $s: expr] , $path: expr, $( $paths: expr) , + ) => {
13291307 lazy_static! {
13301308 static ref $name: Vec <[ $t; $s] > = lazy_static_include_array_inner!( $name: [ $t; $s] , $path $( , $paths) +) ;
13311309 }
1332-
1333- lazy_static_include_array_impl!( $name) ;
13341310 } ;
13351311 ( pub $name: ident: [ $t: ident; $s: expr] , $path: expr ) => {
13361312 lazy_static! {
13371313 pub static ref $name: [ $t; $s] = lazy_static_include_array_inner!( $name: [ $t; $s] , $path) ;
13381314 }
1339-
1340- lazy_static_include_array_impl!( $name) ;
13411315 } ;
13421316 ( pub $name: ident: [ $t: ident; $s: expr] , $path: expr, $( $paths: expr) , + ) => {
13431317 lazy_static! {
13441318 pub static ref $name: Vec <[ $t; $s] > = lazy_static_include_array_inner!( $name: [ $t; $s] , $path $( , $paths) +) ;
13451319 }
1346-
1347- lazy_static_include_array_impl!( $name) ;
13481320 } ;
13491321}
13501322
0 commit comments