Ignore dead_code warnings in test
warning: trait `AssertNotSerdeSerialize` is never used --> test_suite/tests/test_serde_path.rs:39:7 | 39 | trait AssertNotSerdeSerialize {} | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default warning: trait `AssertNotSerdeDeserialize` is never used --> test_suite/tests/test_serde_path.rs:43:7 | 43 | trait AssertNotSerdeDeserialize<'a> {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: method `serialize` is never used --> test_suite/tests/test_serde_path.rs:31:12 | 30 | pub trait Serialize { | --------- method in this trait 31 | fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>; | ^^^^^^^^^ warning: associated function `deserialize` is never used --> test_suite/tests/test_serde_path.rs:35:12 | 34 | pub trait Deserialize<'a>: Sized { | ----------- associated function in this trait 35 | fn deserialize<D: Deserializer<'a>>(deserializer: D) -> Result<Self, D::Error>; | ^^^^^^^^^^^
This commit is contained in:
parent
ede9762a58
commit
846f865de2
@ -27,19 +27,21 @@ mod fake_serde {
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub trait Serialize {
|
pub trait Serialize {
|
||||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>;
|
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub trait Deserialize<'a>: Sized {
|
pub trait Deserialize<'a>: Sized {
|
||||||
fn deserialize<D: Deserializer<'a>>(deserializer: D) -> Result<Self, D::Error>;
|
fn deserialize<D: Deserializer<'a>>(deserializer: D) -> Result<Self, D::Error>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
trait AssertNotSerdeSerialize {}
|
pub trait AssertNotSerdeSerialize {}
|
||||||
|
|
||||||
impl<T: serde::Serialize> AssertNotSerdeSerialize for T {}
|
impl<T: serde::Serialize> AssertNotSerdeSerialize for T {}
|
||||||
|
|
||||||
trait AssertNotSerdeDeserialize<'a> {}
|
pub trait AssertNotSerdeDeserialize<'a> {}
|
||||||
|
|
||||||
impl<'a, T: serde::Deserialize<'a>> AssertNotSerdeDeserialize<'a> for T {}
|
impl<'a, T: serde::Deserialize<'a>> AssertNotSerdeDeserialize<'a> for T {}
|
||||||
|
Loading…
Reference in New Issue
Block a user