Work around test suite warning in rustc older than 1.39
Apparently this is fine in 1.39 and up, but older compilers warn. warning: enum is never used: `Error` --> tests/test_display.rs:151:5 | 151 | pub enum Error {} | ^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default warning: struct is never constructed: `MyError` --> tests/test_lints.rs:15:5 | 15 | pub struct MyError; | ^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
This commit is contained in:
parent
bcb60bd1b5
commit
f42549e0ef
|
@ -149,6 +149,8 @@ fn test_void() {
|
|||
#[derive(Error, Debug)]
|
||||
#[error("...")]
|
||||
pub enum Error {}
|
||||
|
||||
let _: Error;
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -13,4 +13,6 @@ fn test_unused_qualifications() {
|
|||
#[derive(Debug, Error)]
|
||||
#[error("...")]
|
||||
pub struct MyError;
|
||||
|
||||
let _: MyError;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue