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