diff --git a/Cargo.toml b/Cargo.toml index 7280727e..a3932436 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,6 +47,7 @@ assert_hex = "0.4.1" clap = { version = "3.1.6", features = ["derive"] } envconfig = "0.10.0" rstest = { version = "0.12.0", default-features = false } +rustversion = "1.0.16" [features] default = ["libudev"] diff --git a/examples/loopback.rs b/examples/loopback.rs index 65f5bd35..dc519345 100644 --- a/examples/loopback.rs +++ b/examples/loopback.rs @@ -193,6 +193,16 @@ fn loopback_standard<'a>( } } +#[rustversion::before(1.63)] +fn loopback_split<'a>( + _port: &mut Box, + _read_stats: &mut Stats<'a>, + _write_stats: &mut Stats<'a>, +) { + unimplemented!("requires Rust 1.63 or later"); +} + +#[rustversion::since(1.63)] fn loopback_split<'a>( port: &mut Box, read_stats: &mut Stats<'a>,