Update exhaustive matching to syn 1.0.90
This commit is contained in:
parent
7e19ae8c94
commit
b23a768414
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -59,6 +59,10 @@ jobs:
|
||||
- run: cd serde && cargo test --features derive,rc,unstable
|
||||
- run: cd test_suite/no_std && cargo build
|
||||
if: matrix.os != 'windows'
|
||||
- run: cd serde_derive && cargo check --tests
|
||||
env:
|
||||
RUSTFLAGS: --cfg exhaustive ${{env.RUSTFLAGS}}
|
||||
if: matrix.os != 'windows'
|
||||
|
||||
msrv:
|
||||
name: Rust 1.13.0
|
||||
|
@ -23,7 +23,7 @@ proc-macro = true
|
||||
[dependencies]
|
||||
proc-macro2 = "1.0"
|
||||
quote = "1.0"
|
||||
syn = "1.0.60"
|
||||
syn = "1.0.90"
|
||||
|
||||
[dev-dependencies]
|
||||
serde = { version = "1.0", path = "../serde" }
|
||||
|
@ -184,9 +184,7 @@ pub fn with_bound(
|
||||
|
||||
syn::Type::Infer(_) | syn::Type::Never(_) | syn::Type::Verbatim(_) => {}
|
||||
|
||||
#[cfg(test)]
|
||||
syn::Type::__TestExhaustive(_) => unimplemented!(),
|
||||
#[cfg(not(test))]
|
||||
#[cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
@ -1912,9 +1912,7 @@ fn collect_lifetimes(ty: &syn::Type, out: &mut BTreeSet<syn::Lifetime>) {
|
||||
| syn::Type::Infer(_)
|
||||
| syn::Type::Verbatim(_) => {}
|
||||
|
||||
#[cfg(test)]
|
||||
syn::Type::__TestExhaustive(_) => unimplemented!(),
|
||||
#[cfg(not(test))]
|
||||
#[cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
@ -147,9 +147,7 @@ impl ReplaceReceiver<'_> {
|
||||
|
||||
Type::Infer(_) | Type::Never(_) | Type::Verbatim(_) => {}
|
||||
|
||||
#[cfg(test)]
|
||||
Type::__TestExhaustive(_) => unimplemented!(),
|
||||
#[cfg(not(test))]
|
||||
#[cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
@ -60,6 +60,7 @@
|
||||
clippy::use_self,
|
||||
clippy::wildcard_imports
|
||||
)]
|
||||
#![cfg_attr(all(test, exhaustive), feature(non_exhaustive_omitted_patterns_lint))]
|
||||
|
||||
#[macro_use]
|
||||
extern crate quote;
|
||||
|
@ -17,7 +17,7 @@ path = "lib.rs"
|
||||
[dependencies]
|
||||
proc-macro2 = "1.0"
|
||||
quote = "1.0"
|
||||
syn = { version = "1.0.60", default-features = false, features = ["derive", "parsing", "printing", "clone-impls"] }
|
||||
syn = { version = "1.0.90", default-features = false, features = ["derive", "parsing", "printing", "clone-impls"] }
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
Loading…
Reference in New Issue
Block a user