Skip to content

Commit

Permalink
Merge pull request #273 from cspiegel/json-macro-panic
Browse files Browse the repository at this point in the history
Document the fact that json! can panic.
  • Loading branch information
dtolnay authored Mar 3, 2017
2 parents c5e17b6 + 2ff5c07 commit 419cd59
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion json/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
/// Variables or expressions can be interpolated into the JSON literal. Any type
/// interpolated into an array element or object value must implement Serde's
/// `Serialize` trait, while any type interpolated into a object key must
/// implement `Into<String>`.
/// implement `Into<String>`. If the `Serialize` implementation of the
/// interpolated type decides to fail, or if the interpolated type contains a
/// map with non-string keys, the `json!` macro will panic.
///
/// ```rust
/// # #![allow(unused_variables)]
Expand Down

0 comments on commit 419cd59

Please sign in to comment.