diff --git a/tests/source/type.rs b/tests/source/type.rs index 2c2c32e7602c..208a30e634e5 100644 --- a/tests/source/type.rs +++ b/tests/source/type.rs @@ -121,3 +121,11 @@ fn issue3117() { } } } + +// #3139 +fn issue3139() { + assert_eq!( + to_json_value(&None :: ).unwrap(), + json!( { "test": None :: } ) + ); +} diff --git a/tests/target/type.rs b/tests/target/type.rs index d0d1543e10a0..b8f41218f417 100644 --- a/tests/target/type.rs +++ b/tests/target/type.rs @@ -120,3 +120,11 @@ fn issue3117() { } } } + +// #3139 +fn issue3139() { + assert_eq!( + to_json_value(&None::).unwrap(), + json!({ "test": None:: }) + ); +}