File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -373,6 +373,12 @@ extern crate alloc;
373
373
#[ cfg( feature = "std" ) ]
374
374
extern crate std;
375
375
376
+ // Not public API. Used from macro-generated code.
377
+ #[ doc( hidden) ]
378
+ pub mod __private {
379
+ pub use alloc:: vec;
380
+ }
381
+
376
382
#[ cfg( feature = "std" ) ]
377
383
#[ cfg_attr( docsrs, doc( cfg( feature = "std" ) ) ) ]
378
384
#[ doc( inline) ]
Original file line number Diff line number Diff line change @@ -77,12 +77,12 @@ macro_rules! json_internal {
77
77
78
78
// Done with trailing comma.
79
79
( @array [ $( $elems: expr, ) * ] ) => {
80
- vec![ $( $elems, ) * ]
80
+ $crate :: __private :: vec![ $( $elems, ) * ]
81
81
} ;
82
82
83
83
// Done without trailing comma.
84
84
( @array [ $( $elems: expr) ,* ] ) => {
85
- vec![ $( $elems) ,* ]
85
+ $crate :: __private :: vec![ $( $elems) ,* ]
86
86
} ;
87
87
88
88
// Next element is `null`.
@@ -254,7 +254,7 @@ macro_rules! json_internal {
254
254
} ;
255
255
256
256
( [ ] ) => {
257
- $crate:: Value :: Array ( vec![ ] )
257
+ $crate:: Value :: Array ( $crate :: __private :: vec![ ] )
258
258
} ;
259
259
260
260
( [ $( $tt: tt) + ] ) => {
You can’t perform that action at this time.
0 commit comments