Fix tests for 1.0.90 syn version

This commit is contained in:
tyranron 2022-03-29 12:28:25 +03:00
parent 032ff3f4a6
commit 4182a8cf2b
No known key found for this signature in database
GPG key ID: 762E144FB230A4F0
2 changed files with 5 additions and 7 deletions

View file

@ -21,7 +21,7 @@ proc-macro = true
proc-macro-error = "1.0.2" proc-macro-error = "1.0.2"
proc-macro2 = "1.0.1" proc-macro2 = "1.0.1"
quote = "1.0.3" quote = "1.0.3"
syn = { version = "1.0.60", features = ["extra-traits", "full", "parsing", "visit", "visit-mut"], default-features = false } syn = { version = "1.0.90", features = ["extra-traits", "full", "parsing", "visit", "visit-mut"], default-features = false }
url = "2.0" url = "2.0"
[dev-dependencies] [dev-dependencies]

View file

@ -208,12 +208,10 @@ impl TypeExt for syn::Type {
T::BareFn(_) | T::Infer(_) | T::Macro(_) | T::Never(_) | T::Verbatim(_) => {} T::BareFn(_) | T::Infer(_) | T::Macro(_) | T::Never(_) | T::Verbatim(_) => {}
// Following the syn idiom for exhaustive matching on Type: // Following the syn idiom for exhaustive matching on Type:
// https://github.com/dtolnay/syn/blob/master/src/ty.rs#L66-L88 // https://github.com/dtolnay/syn/blob/1.0.90/src/ty.rs#L67-L87
#[cfg(test)] // TODO: #[cfg_attr(test, deny(non_exhaustive_omitted_patterns))]
T::__TestExhaustive(_) => unimplemented!(), // https://github.com/rust-lang/rust/issues/89554
_ => unimplemented!(),
#[cfg(not(test))]
_ => {}
} }
} }