Commit Graph

153 Commits

Author SHA1 Message Date
David Tolnay
c5f606f10f
Remove unnecessary Syntexes 2016-06-12 15:50:45 -07:00
David Tolnay
5923a0cd2f Merge pull request #371 from dtolnay/hasher
De/serialize for HashMap<K, V, S> and HashSet<T, S>
2016-06-11 11:51:57 -07:00
David Tolnay
021f4f2d70
Use serde_codegen::expand in serde_tests/build.rs 2016-06-11 10:02:10 -07:00
David Tolnay
decc571988
De/serialize for HashSet<T, S> 2016-06-11 10:00:33 -07:00
David Tolnay
322d7a90db
Add ser tests for normal HashMap 2016-06-11 10:00:33 -07:00
David Tolnay
46a1860601
De/serialize for HashMap<K, V, S> 2016-06-11 10:00:33 -07:00
Erick Tryzelaar
48da62ed07 Updating to rustc 1.11.0-nightly (7d2f75a95 2016-06-09) 2016-06-11 08:19:51 -07:00
David Tolnay
bb059b97c0
Release 0.7.9 2016-06-09 20:16:49 -07:00
David Tolnay
58fa302007
Release 0.7.8 2016-06-06 10:13:52 -07:00
David Tolnay
01dfad6705
Fix attributes canceling each other 2016-06-05 11:40:30 -07:00
David Tolnay
578f34ecaf
Use "bound" attribute instead of "where" 2016-06-05 11:17:43 -07:00
David Tolnay
bd40830905 Do not generate bounds from recursive types 2016-06-04 16:12:01 -07:00
David Tolnay
660ea7bd7b Attribute for handwritten where clauses 2016-06-04 15:48:42 -07:00
Manish Goregaokar
379c9e7148
Rustup too rustc 1.11.0-nightly (7746a334d 2016-05-28) 2016-05-30 14:01:57 +05:30
David Tolnay
938f42faf6 Support (de)serialize_with in tuples 2016-05-19 10:53:38 -07:00
David Tolnay
f1b4072444 Strip more references 2016-05-18 23:48:56 -07:00
David Tolnay
004dcaec3b Remove unused imports and needless borrows 2016-05-13 10:47:09 -07:00
David Tolnay
709ac64dfc Release 0.7.5 2016-05-11 09:36:30 -07:00
Homu
a9a4b2d8e2 Auto merge of #293 - dtolnay:duplicate, r=oli-obk
feat(codegen): Detect repeated struct field when deserializing

Addresses #59. Let me know whether you think we need an escape hatch to opt out of this check.
2016-05-11 19:44:34 +09:00
David Tolnay
eeb4efc19c feat(codegen): Detect repeated struct field when deserializing 2016-05-10 09:52:51 -07:00
David Tolnay
76b70455ec Field with deserialize_with should not implement Deserialize 2016-05-10 09:50:32 -07:00
David Tolnay
f4414bfc14 Reduce dependence on type inference 2016-05-07 15:25:13 -07:00
Erick Tryzelaar
8378267b9b Merge pull request #303 from antrik/rustup
Update for latest libsyntax changes
2016-05-03 22:07:38 -07:00
Olaf Buddenhagen
6e7a75c859 Adapt for parser::PathParsingMode interface change in libsyntax
This was renamed upstream in
6c44bea644

It's an incompatible change requiring new versions of syntex, aster, and
quasi.
2016-05-02 07:25:29 +02:00
David Tolnay
305fab7c16 fix(codegen): Support extern crate serde not in toplevel module 2016-04-25 09:58:01 -07:00
David Tolnay
fd3c15fb68 fix(codegen): Discard type defaults from impl generics 2016-04-19 10:28:43 -07:00
Erick Tryzelaar
808b06940e Merge pull request #285 from dtolnay/bounds
feat(codegen): Infer Default and Deserialize bounds correctly
2016-04-19 12:25:13 -05:00
David Tolnay
0439bb9d02 Deserialize impl for Box<[T]> 2016-04-17 20:59:26 -07:00
David Tolnay
886670134a feat(codegen): Infer Default and Deserialize bounds correctly 2016-04-13 21:56:12 -07:00
David Tolnay
ff02b0c741 fix(codegen): Take into account default=... when skip_deserializing 2016-04-12 23:42:24 -07:00
Erick Tryzelaar
dbba537b66 Merge branch 'skip_deserializing' of https://github.com/dtolnay/serde into dtolnay-skip_deserializing 2016-04-12 08:52:25 -07:00
Erick Tryzelaar
bc2324fba7 Merge branch 'feature/inhibit' of https://github.com/dtolnay/serde into dtolnay-feature/inhibit 2016-04-12 08:41:02 -07:00
Erick Tryzelaar
451700d3d2 Add more tests for renaming missing field 2016-04-12 08:26:56 -07:00
Erick Tryzelaar
1c5d83889c Merge remote-tracking branch 'remotes/origin/master' into renamed_missing_field 2016-04-12 08:24:34 -07:00
Oliver Schneider
f659fa8919 add a test 2016-04-12 12:42:07 +02:00
David Tolnay
87393b61bb feat(codegen) skip_deserializing 2016-04-10 20:29:37 -07:00
Erick Tryzelaar
a84b6aaedd Bump syntex/aster/quasi version 2016-04-10 19:54:54 -07:00
Anthony Ramine
c7c5b50f35 Silence unused_variables warning with empty enums
Deriving Serialize or Deserialize on Void-like enums triggered an
unused_variables warning.
2016-04-03 14:31:04 +02:00
Erick Tryzelaar
9785646246 feat(cargo): Update syntex 2016-03-16 23:52:21 -07:00
David Tolnay
19ec8bbdb9 feat(codegen): Inhibit generic bounds if skip_serializing
The generated code for a struct like:

    struct Test<A, B, C> {
        a: X<A>
        #[serde(skip_serializing)]
        b: B
        #[serde(serialize_with="...")]
        c: C
    }

Used to be:

    impl<A, B, C> Serialize for Test<A, B, C>
        where A: Serialize,
              B: Serialize,
              C: Serialize,
    { ... }

Now it is:

    impl<A, B, C> Serialize for Test<A, B, C>
        where X<A>: Serialize,
    { ... }

Both `skip_serializing` and `serialize_with` mean the type does not need to
implement `Serialize`.
2016-02-28 19:11:51 -08:00
Erick Tryzelaar
ec75f22396 feat(errors): Switch Error::custom to use Into<String> 2016-02-26 21:12:16 -08:00
Erick Tryzelaar
3e94bf2d13 fix(warnings): Fix clippy warnings 2016-02-23 20:38:06 -08:00
Erick Tryzelaar
118476b98b feat(de): Rename de::Error trait methods 2016-02-23 20:21:07 -08:00
Erick Tryzelaar
d6a50b8977 feat(cargo): Version bump to 0.7! 2016-02-23 05:26:07 -08:00
Erick Tryzelaar
76b3dead9b feat(serde): Add hooks for fixed-sized arrays
Closes #244
2016-02-23 05:15:44 -08:00
Erick Tryzelaar
49b0bfd257 feat(de): Remove dependency on the num crate. 2016-02-21 21:22:58 -08:00
Erick Tryzelaar
4cb5ee0678 feat(impls): Add impls for std::net::SocketAddr{,V4,V6} 2016-02-21 20:21:21 -08:00
Erick Tryzelaar
b257084f3a feat(impls): Add impls for std::net::Ip{,v4,v6}Addr 2016-02-21 20:21:21 -08:00
Erick Tryzelaar
740865b637 feat(de): Add an Error::unknown_variant error.
Closes #169
2016-02-21 16:26:52 -08:00
Erick Tryzelaar
78cf29d1d1 feat(codegen): Switch attributes to using using paths not expressions 2016-02-21 15:28:25 -08:00