mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-29 03:47:55 +00:00
Test never_type
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![cfg_attr(feature = "unstable", feature(never_type))]
|
||||
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
|
||||
@@ -548,6 +550,16 @@ declare_tests! {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "unstable")]
|
||||
declare_tests! {
|
||||
test_never_result {
|
||||
Ok::<u8, !>(0) => &[
|
||||
Token::NewtypeVariant { name: "Result", variant: "Ok" },
|
||||
Token::U8(0),
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn test_cannot_serialize_paths() {
|
||||
|
||||
Reference in New Issue
Block a user