mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-24 09:50:28 +00:00
18 lines
341 B
Rust
18 lines
341 B
Rust
mod util;
|
|
use schemars::JsonSchema;
|
|
use util::*;
|
|
|
|
#[allow(dead_code)]
|
|
#[derive(JsonSchema)]
|
|
struct MyStruct {
|
|
unsigned: u32,
|
|
nonzero_unsigned: std::num::NonZeroU32,
|
|
signed: i32,
|
|
nonzero_signed: std::num::NonZeroI32,
|
|
}
|
|
|
|
#[test]
|
|
fn nonzero_ints() -> TestResult {
|
|
test_default_generated_schema::<MyStruct>("nonzero_ints")
|
|
}
|