-
-
Notifications
You must be signed in to change notification settings - Fork 774
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
126 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
serde_derive/src/de.rs → serde_derive/src/implementation/de.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#[macro_use] | ||
mod bound; | ||
#[macro_use] | ||
mod fragment; | ||
|
||
pub mod de; | ||
mod dummy; | ||
mod pretend; | ||
pub mod ser; | ||
mod this; |
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
serde_derive/src/ser.rs → serde_derive/src/implementation/ser.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[package] | ||
name = "serde_derive_implementation" | ||
version = "0.29.1" | ||
authors = ["Erick Tryzelaar <[email protected]>", "David Tolnay <[email protected]>"] | ||
description = "Serde derive macros implementations." | ||
documentation = "https://docs.rs/serde_derive_implementation" | ||
edition = "2015" | ||
exclude = ["build.rs"] | ||
homepage = "https://serde.rs" | ||
keywords = ["serde", "serialization"] | ||
license = "MIT OR Apache-2.0" | ||
repository = "https://github.com/serde-rs/serde" | ||
rust-version = "1.56" | ||
|
||
[lib] | ||
path = "lib.rs" | ||
|
||
[dependencies] | ||
proc-macro2 = { workspace = true } | ||
quote = { workspace = true } | ||
syn = { workspace = true, features = ["clone-impls", "derive", "parsing", "printing"] } | ||
serde_derive_internals = { path = "../serde_derive_internals" } | ||
|
||
[package.metadata.docs.rs] | ||
targets = ["x86_64-unknown-linux-gnu"] | ||
rustdoc-args = ["--generate-link-to-definition"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../LICENSE-APACHE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../LICENSE-MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use std::path::Path; | ||
|
||
fn main() { | ||
// Warning: build.rs is not published to crates.io. | ||
|
||
println!("cargo:rerun-if-changed=build.rs"); | ||
println!("cargo:rerun-if-changed=src/mod.rs"); | ||
|
||
println!("cargo:rustc-cfg=check_cfg"); | ||
println!("cargo:rustc-check-cfg=cfg(check_cfg)"); | ||
println!("cargo:rustc-check-cfg=cfg(exhaustive)"); | ||
println!("cargo:rustc-check-cfg=cfg(serde_build_from_git)"); | ||
println!("cargo:rustc-check-cfg=cfg(feature, values(\"deserialize_in_place\"))"); | ||
|
||
// Sometimes on Windows the git checkout does not correctly wire up the | ||
// symlink from serde_derive_implementation/src to serde_derive/src/internals. | ||
// When this happens we'll just build based on relative paths within the git | ||
// repo. | ||
let mod_behind_symlink = Path::new("src/mod.rs"); | ||
if !mod_behind_symlink.exists() { | ||
println!("cargo:rustc-cfg=serde_build_from_git"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#![doc(html_root_url = "https://docs.rs/serde_derive_impl/0.29.1")] | ||
#![cfg_attr(not(check_cfg), allow(unexpected_cfgs))] | ||
// Ignored clippy lints | ||
#![allow( | ||
clippy::cognitive_complexity, | ||
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/7575 | ||
clippy::collapsible_match, | ||
clippy::derive_partial_eq_without_eq, | ||
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/6797 | ||
clippy::manual_map, | ||
clippy::missing_panics_doc, | ||
clippy::redundant_field_names, | ||
clippy::result_unit_err, | ||
clippy::should_implement_trait, | ||
clippy::trivially_copy_pass_by_ref, | ||
clippy::wildcard_in_or_patterns, | ||
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/5704 | ||
clippy::unnested_or_patterns, | ||
)] | ||
// Ignored clippy_pedantic lints | ||
#![allow( | ||
clippy::doc_markdown, | ||
clippy::enum_glob_use, | ||
clippy::items_after_statements, | ||
clippy::let_underscore_untyped, | ||
clippy::manual_assert, | ||
clippy::match_same_arms, | ||
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/6984 | ||
clippy::match_wildcard_for_single_variants, | ||
clippy::missing_errors_doc, | ||
clippy::module_name_repetitions, | ||
clippy::must_use_candidate, | ||
clippy::return_self_not_must_use, | ||
clippy::similar_names, | ||
clippy::single_match_else, | ||
clippy::struct_excessive_bools, | ||
clippy::too_many_lines, | ||
clippy::unused_self, | ||
clippy::wildcard_imports | ||
)] | ||
|
||
extern crate proc_macro2; | ||
extern crate quote; | ||
extern crate syn; | ||
extern crate serde_derive_internals; | ||
|
||
use serde_derive_internals as internals; | ||
|
||
#[cfg_attr(serde_build_from_git, path = "../serde_derive/src/implementation/mod.rs")] | ||
#[cfg_attr(not(serde_build_from_git), path = "src/mod.rs")] | ||
mod implementation; | ||
|
||
pub use implementation::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../serde_derive/src/implementation/ |