Skip to content

Commit 2f05552

Browse files
Added [serde(tag)] to the list of tags that are known to give issues (bincode-org#584)
* Added `[serde(tag)]` to the list of tags that are known to give issues * Removed the old warning about serde and no-std. Added references to the documentation in the serde::DecodeError enum
1 parent bdbc051 commit 2f05552

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/features/serde/mod.rs

+9-6
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,13 @@
4141
//!
4242
//! # Known issues
4343
//!
44-
//! Currently the `serde` feature will automatically enable the `alloc` and `std` feature. If you're running in a `#[no_std]` environment consider using bincode's own derive macros.
45-
//!
4644
//! Because bincode is a format without meta data, there are several known issues with serde's attributes. Please do not use any of the following attributes if you plan on using bincode, or use bincode's own `derive` macros.
45+
//! - `#[serde(flatten)]`
4746
//! - `#[serde(skip)]`
48-
//! - `#[serde(skip_serializing)]`
4947
//! - `#[serde(skip_deserializing)]`
48+
//! - `#[serde(skip_serializing)]`
5049
//! - `#[serde(skip_serializing_if = "path")]`
51-
//! - `#[serde(flatten)]`
50+
//! - `#[serde(tag = "...")]`
5251
//! - `#[serde(untagged)]`
5352
//!
5453
//! **Using any of the above attributes can and will cause issues with bincode and will result in lost data**. Consider using bincode's own derive macro instead.
@@ -68,13 +67,17 @@ pub use self::ser::*;
6867
#[derive(Debug)]
6968
#[non_exhaustive]
7069
pub enum DecodeError {
71-
/// Bincode does not support serde's `any` decoding feature
70+
/// Bincode does not support serde's `any` decoding feature.
71+
///
72+
/// See the "known issues" list in the serde module for more information on this.
7273
AnyNotSupported,
7374

7475
/// Bincode does not support serde identifiers
7576
IdentifierNotSupported,
7677

77-
/// Bincode does not support serde's `ignored_any`
78+
/// Bincode does not support serde's `ignored_any`.
79+
///
80+
/// See the "known issues" list in the serde module for more information on this.
7881
IgnoredAnyNotSupported,
7982

8083
/// Serde tried decoding a borrowed value from an owned reader. Use `serde_decode_borrowed_from_*` instead

0 commit comments

Comments
 (0)