Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 131f11a

Browse files
committed
Add a test for rust-lang#3139
1 parent 8fb1b17 commit 131f11a

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

tests/source/type.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,11 @@ fn issue3117() {
121121
}
122122
}
123123
}
124+
125+
// #3139
126+
fn issue3139() {
127+
assert_eq!(
128+
to_json_value(&None :: <i32>).unwrap(),
129+
json!( { "test": None :: <i32> } )
130+
);
131+
}

tests/target/type.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,11 @@ fn issue3117() {
120120
}
121121
}
122122
}
123+
124+
// #3139
125+
fn issue3139() {
126+
assert_eq!(
127+
to_json_value(&None::<i32>).unwrap(),
128+
json!({ "test": None::<i32> })
129+
);
130+
}

0 commit comments

Comments
 (0)