File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ const SPECIAL_CASE_MACROS: &[(&str, usize)] = &[
43
43
( "println!" , 0 ) ,
44
44
( "panic!" , 0 ) ,
45
45
( "unreachable!" , 0 ) ,
46
- // From the `log` crate. trace! is added for v2 - see `special_cases` below
46
+ // From the `log` crate.
47
47
( "debug!" , 0 ) ,
48
48
( "error!" , 0 ) ,
49
49
( "info!" , 0 ) ,
@@ -60,6 +60,13 @@ const SPECIAL_CASE_MACROS: &[(&str, usize)] = &[
60
60
( "debug_assert_ne!" , 2 ) ,
61
61
] ;
62
62
63
+ /// Additional special case macros for version 2; these are separated to avoid breaking changes in
64
+ /// version 1.
65
+ const SPECIAL_CASE_MACROS_V2 : & [ ( & str , usize ) ] = & [
66
+ // From the `log` crate.
67
+ ( "trace!" , 0 ) ,
68
+ ] ;
69
+
63
70
const SPECIAL_CASE_ATTR : & [ ( & str , usize ) ] = & [
64
71
// From the `failure` crate.
65
72
( "fail" , 0 ) ,
@@ -198,7 +205,7 @@ impl<'a> OverflowableItem<'a> {
198
205
199
206
fn special_cases_v2 ( & self ) -> & ' static [ ( & ' static str , usize ) ] {
200
207
match self {
201
- OverflowableItem :: MacroArg ( ..) => & [ ( "trace!" , 0 ) ] ,
208
+ OverflowableItem :: MacroArg ( ..) => SPECIAL_CASE_MACROS_V2 ,
202
209
_ => & [ ] ,
203
210
}
204
211
}
You can’t perform that action at this time.
0 commit comments