mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 21:48:02 +00:00
Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ab1ca04b2e | |||
| fb2fe409c8 | |||
| 549fac7235 | |||
| c375d8b19b | |||
| 6cf507f808 | |||
| c3c1641c06 | |||
| 1fcda0ebdb | |||
| 8f16ac0a94 | |||
| 737f78c315 | |||
| 4a97386cb9 | |||
| 5b32217877 | |||
| 5b140361a3 | |||
| 678351eac7 | |||
| 999c261d11 | |||
| efbe574209 | |||
| 33b2677384 | |||
| 01ded9f405 | |||
| fc827ecec2 | |||
| 5c785eee58 | |||
| 819db93a3d | |||
| a6690ea2fe |
@@ -153,11 +153,9 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: dtolnay/rust-toolchain@clippy
|
||||
# The need for -Aredundant_field_names here is a Clippy bug.
|
||||
# https://github.com/rust-lang/rust-clippy/issues/5356
|
||||
- run: cd serde && cargo clippy --features rc,unstable -- -D clippy::all -A clippy::redundant_field_names
|
||||
- run: cd serde_derive && cargo clippy -- -D clippy::all
|
||||
- run: cd serde_derive_internals && cargo clippy -- -D clippy::all
|
||||
- run: cd serde_test && cargo clippy -- -D clippy::all -A clippy::redundant_field_names
|
||||
- run: cd test_suite && cargo clippy --tests --features unstable -- -D clippy::all -A clippy::redundant_field_names
|
||||
- run: cd test_suite/no_std && cargo clippy -- -D clippy::all -A clippy::redundant_field_names
|
||||
- run: cd serde && cargo clippy --features rc,unstable -- -Dclippy::all -Dclippy::pedantic
|
||||
- run: cd serde_derive && cargo clippy -- -Dclippy::all -Dclippy::pedantic
|
||||
- run: cd serde_derive_internals && cargo clippy -- -Dclippy::all -Dclippy::pedantic
|
||||
- run: cd serde_test && cargo clippy -- -Dclippy::all -Dclippy::pedantic
|
||||
- run: cd test_suite && cargo clippy --tests --features unstable -- -Dclippy::all -Dclippy::pedantic
|
||||
- run: cd test_suite/no_std && cargo clippy -- -Dclippy::all -Dclippy::pedantic
|
||||
|
||||
+3
-2
@@ -1,7 +1,8 @@
|
||||
[package]
|
||||
name = "serde"
|
||||
version = "1.0.130" # remember to update html_root_url and serde_derive dependency
|
||||
version = "1.0.131" # remember to update html_root_url and serde_derive dependency
|
||||
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
|
||||
rust-version = "1.15"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "A generic serialization/deserialization framework"
|
||||
homepage = "https://serde.rs"
|
||||
@@ -14,7 +15,7 @@ include = ["build.rs", "src/**/*.rs", "crates-io.md", "README.md", "LICENSE-APAC
|
||||
build = "build.rs"
|
||||
|
||||
[dependencies]
|
||||
serde_derive = { version = "=1.0.130", optional = true, path = "../serde_derive" }
|
||||
serde_derive = { version = "=1.0.131", optional = true, path = "../serde_derive" }
|
||||
|
||||
[dev-dependencies]
|
||||
serde_derive = { version = "1.0", path = "../serde_derive" }
|
||||
|
||||
+5
-4
@@ -60,7 +60,7 @@
|
||||
//!
|
||||
//! [JSON]: https://github.com/serde-rs/json
|
||||
//! [Bincode]: https://github.com/servo/bincode
|
||||
//! [CBOR]: https://github.com/pyfisch/cbor
|
||||
//! [CBOR]: https://github.com/enarx/ciborium
|
||||
//! [YAML]: https://github.com/dtolnay/serde-yaml
|
||||
//! [MessagePack]: https://github.com/3Hren/msgpack-rust
|
||||
//! [TOML]: https://github.com/alexcrichton/toml-rs
|
||||
@@ -73,7 +73,7 @@
|
||||
//! [URL]: https://docs.rs/serde_qs
|
||||
//! [Envy]: https://github.com/softprops/envy
|
||||
//! [Envy Store]: https://github.com/softprops/envy-store
|
||||
//! [Cargo]: http://doc.crates.io/manifest.html
|
||||
//! [Cargo]: https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
//! [AWS Parameter Store]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-paramstore.html
|
||||
//! [S-expressions]: https://github.com/rotty/lexpr-rs
|
||||
//! [D-Bus]: https://docs.rs/zvariant
|
||||
@@ -84,7 +84,7 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Serde types in rustdoc of other crates get linked to here.
|
||||
#![doc(html_root_url = "https://docs.rs/serde/1.0.130")]
|
||||
#![doc(html_root_url = "https://docs.rs/serde/1.0.131")]
|
||||
// Support using Serde without the standard library!
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
// Unstable functionality only if the user asks for it. For tracking and
|
||||
@@ -94,13 +94,14 @@
|
||||
#![cfg_attr(feature = "unstable", feature(never_type))]
|
||||
#![allow(unknown_lints, bare_trait_objects, deprecated)]
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(renamed_and_removed_lints))]
|
||||
#![cfg_attr(feature = "cargo-clippy", deny(clippy, clippy_pedantic))]
|
||||
// Ignored clippy and clippy_pedantic lints
|
||||
#![cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
allow(
|
||||
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/5704
|
||||
unnested_or_patterns,
|
||||
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/7768
|
||||
semicolon_if_nothing_returned,
|
||||
// not available in our oldest supported compiler
|
||||
checked_conversions,
|
||||
empty_enum,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
[package]
|
||||
name = "serde_derive"
|
||||
version = "1.0.130" # remember to update html_root_url
|
||||
version = "1.0.131" # remember to update html_root_url
|
||||
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
|
||||
rust-version = "1.31"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "Macros 1.1 implementation of #[derive(Serialize, Deserialize)]"
|
||||
homepage = "https://serde.rs"
|
||||
|
||||
@@ -50,7 +50,7 @@ pub fn with_where_predicates_from_fields(
|
||||
.data
|
||||
.all_fields()
|
||||
.filter_map(|field| from_field(&field.attrs))
|
||||
.flat_map(|predicates| predicates.to_vec());
|
||||
.flat_map(<[syn::WherePredicate]>::to_vec);
|
||||
|
||||
let mut generics = generics.clone();
|
||||
generics.make_where_clause().predicates.extend(predicates);
|
||||
@@ -72,7 +72,7 @@ pub fn with_where_predicates_from_variants(
|
||||
let predicates = variants
|
||||
.iter()
|
||||
.filter_map(|variant| from_variant(&variant.attrs))
|
||||
.flat_map(|predicates| predicates.to_vec());
|
||||
.flat_map(<[syn::WherePredicate]>::to_vec);
|
||||
|
||||
let mut generics = generics.clone();
|
||||
generics.make_where_clause().predicates.extend(predicates);
|
||||
|
||||
@@ -1458,7 +1458,7 @@ fn deserialize_adjacently_tagged_enum(
|
||||
while let _serde::__private::Some(__k) = #next_key {
|
||||
match __k {
|
||||
_serde::__private::de::TagContentOtherField::Other => {
|
||||
try!(_serde::de::MapAccess::next_value::<_serde::de::IgnoredAny>(&mut __map));
|
||||
let _ = try!(_serde::de::MapAccess::next_value::<_serde::de::IgnoredAny>(&mut __map));
|
||||
continue;
|
||||
},
|
||||
_serde::__private::de::TagContentOtherField::Tag => {
|
||||
|
||||
@@ -13,9 +13,8 @@
|
||||
//!
|
||||
//! [https://serde.rs/derive.html]: https://serde.rs/derive.html
|
||||
|
||||
#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.130")]
|
||||
#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.131")]
|
||||
#![allow(unknown_lints, bare_trait_objects)]
|
||||
#![deny(clippy::all, clippy::pedantic)]
|
||||
// Ignored clippy lints
|
||||
#![allow(
|
||||
// clippy false positive: https://github.com/rust-lang/rust-clippy/issues/7054
|
||||
@@ -44,6 +43,7 @@
|
||||
clippy::indexing_slicing,
|
||||
clippy::items_after_statements,
|
||||
clippy::let_underscore_drop,
|
||||
clippy::manual_assert,
|
||||
clippy::map_err_ignore,
|
||||
clippy::match_same_arms,
|
||||
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/6984
|
||||
|
||||
@@ -65,11 +65,13 @@ pub fn pretend_used(cont: &Container, is_packed: bool) -> TokenStream {
|
||||
fn pretend_fields_used(cont: &Container, is_packed: bool) -> TokenStream {
|
||||
match &cont.data {
|
||||
Data::Enum(variants) => pretend_fields_used_enum(cont, variants),
|
||||
Data::Struct(Style::Struct, fields) => if is_packed {
|
||||
pretend_fields_used_struct_packed(cont, fields)
|
||||
} else {
|
||||
pretend_fields_used_struct(cont, fields)
|
||||
},
|
||||
Data::Struct(Style::Struct, fields) => {
|
||||
if is_packed {
|
||||
pretend_fields_used_struct_packed(cont, fields)
|
||||
} else {
|
||||
pretend_fields_used_struct(cont, fields)
|
||||
}
|
||||
}
|
||||
Data::Struct(_, _) => quote!(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "serde_derive_internals"
|
||||
version = "0.26.0" # remember to update html_root_url
|
||||
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
|
||||
rust-version = "1.31"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "AST representation used by Serde derive macros. Unstable."
|
||||
homepage = "https://serde.rs"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#![doc(html_root_url = "https://docs.rs/serde_derive_internals/0.26.0")]
|
||||
#![allow(unknown_lints, bare_trait_objects)]
|
||||
#![deny(clippy::all, clippy::pedantic)]
|
||||
// Ignored clippy lints
|
||||
#![allow(
|
||||
clippy::cognitive_complexity,
|
||||
@@ -23,6 +22,7 @@
|
||||
clippy::enum_glob_use,
|
||||
clippy::items_after_statements,
|
||||
clippy::let_underscore_drop,
|
||||
clippy::manual_assert,
|
||||
clippy::match_same_arms,
|
||||
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/6984
|
||||
clippy::match_wildcard_for_single_variants,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
[package]
|
||||
name = "serde_test"
|
||||
version = "1.0.130" # remember to update html_root_url
|
||||
version = "1.0.131" # remember to update html_root_url
|
||||
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
|
||||
rust-version = "1.15"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "Token De/Serializer for testing De/Serialize implementations"
|
||||
homepage = "https://serde.rs"
|
||||
|
||||
@@ -144,9 +144,8 @@
|
||||
//! # }
|
||||
//! ```
|
||||
|
||||
#![doc(html_root_url = "https://docs.rs/serde_test/1.0.130")]
|
||||
#![doc(html_root_url = "https://docs.rs/serde_test/1.0.131")]
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(renamed_and_removed_lints))]
|
||||
#![cfg_attr(feature = "cargo-clippy", deny(clippy, clippy_pedantic))]
|
||||
// Ignored clippy lints
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, needless_doctest_main))]
|
||||
// Ignored clippy_pedantic lints
|
||||
@@ -155,6 +154,7 @@
|
||||
allow(
|
||||
cloned_instead_of_copied,
|
||||
empty_line_after_outer_attr,
|
||||
manual_assert,
|
||||
missing_docs_in_private_items,
|
||||
missing_panics_doc,
|
||||
module_name_repetitions,
|
||||
|
||||
@@ -23,4 +23,4 @@ rustversion = "1.0"
|
||||
serde = { path = "../serde", features = ["rc", "derive"] }
|
||||
serde_derive = { path = "../serde_derive", features = ["deserialize_in_place"] }
|
||||
serde_test = { path = "../serde_test" }
|
||||
trybuild = { version = "1.0.19", features = ["diff"] }
|
||||
trybuild = { version = "1.0.49", features = ["diff"] }
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
clippy::from_over_into,
|
||||
// Clippy bug: https://github.com/rust-lang/rust-clippy/issues/7422
|
||||
clippy::nonstandard_macro_braces,
|
||||
clippy::too_many_lines,
|
||||
clippy::trivially_copy_pass_by_ref
|
||||
)]
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#![allow(clippy::items_after_statements, clippy::used_underscore_binding)]
|
||||
|
||||
use serde::{Deserialize, Deserializer};
|
||||
use serde_test::{assert_de_tokens, assert_de_tokens_error, Token};
|
||||
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
#![allow(clippy::decimal_literal_representation, clippy::unreadable_literal)]
|
||||
#![allow(
|
||||
clippy::decimal_literal_representation,
|
||||
clippy::empty_enum,
|
||||
clippy::manual_assert,
|
||||
clippy::needless_pass_by_value,
|
||||
clippy::unreadable_literal
|
||||
)]
|
||||
#![cfg_attr(feature = "unstable", feature(never_type))]
|
||||
|
||||
use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
|
||||
|
||||
@@ -6,9 +6,14 @@
|
||||
#![allow(
|
||||
unknown_lints,
|
||||
mixed_script_confusables,
|
||||
clippy::items_after_statements,
|
||||
clippy::missing_errors_doc,
|
||||
clippy::missing_panics_doc,
|
||||
clippy::must_use_candidate,
|
||||
// Clippy bug: https://github.com/rust-lang/rust-clippy/issues/7422
|
||||
clippy::nonstandard_macro_braces,
|
||||
clippy::ptr_arg,
|
||||
clippy::too_many_lines,
|
||||
clippy::trivially_copy_pass_by_ref
|
||||
)]
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#![deny(trivial_numeric_casts)]
|
||||
#![allow(clippy::redundant_field_names)]
|
||||
#![allow(
|
||||
clippy::enum_variant_names,
|
||||
clippy::redundant_field_names,
|
||||
clippy::too_many_lines
|
||||
)]
|
||||
|
||||
mod bytes;
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#![allow(clippy::used_underscore_binding)]
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#![allow(clippy::type_repetition_in_bounds)]
|
||||
|
||||
#[test]
|
||||
fn test_gen_custom_serde() {
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#![allow(clippy::similar_names)]
|
||||
|
||||
use serde::de::value::{self, MapAccessDeserializer};
|
||||
use serde::de::{IntoDeserializer, MapAccess, Visitor};
|
||||
use serde::{Deserialize, Deserializer};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: failed to parse borrowed lifetimes: "zzz"
|
||||
--> $DIR/bad_lifetimes.rs:5:22
|
||||
--> tests/ui/borrow/bad_lifetimes.rs:5:22
|
||||
|
|
||||
5 | #[serde(borrow = "zzz")]
|
||||
| ^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: duplicate borrowed lifetime `'a`
|
||||
--> $DIR/duplicate_lifetime.rs:5:22
|
||||
--> tests/ui/borrow/duplicate_lifetime.rs:5:22
|
||||
|
|
||||
5 | #[serde(borrow = "'a + 'a")]
|
||||
| ^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: duplicate serde attribute `borrow`
|
||||
--> $DIR/duplicate_variant.rs:8:13
|
||||
--> tests/ui/borrow/duplicate_variant.rs:8:13
|
||||
|
|
||||
8 | #[serde(borrow)]
|
||||
| ^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: at least one lifetime must be borrowed
|
||||
--> $DIR/empty_lifetimes.rs:5:22
|
||||
--> tests/ui/borrow/empty_lifetimes.rs:5:22
|
||||
|
|
||||
5 | #[serde(borrow = "")]
|
||||
| ^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: field `s` has no lifetimes to borrow
|
||||
--> $DIR/no_lifetimes.rs:5:5
|
||||
--> tests/ui/borrow/no_lifetimes.rs:5:5
|
||||
|
|
||||
5 | / #[serde(borrow)]
|
||||
6 | | s: String,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(borrow)] may only be used on newtype variants
|
||||
--> $DIR/struct_variant.rs:8:5
|
||||
--> tests/ui/borrow/struct_variant.rs:8:5
|
||||
|
|
||||
8 | / #[serde(borrow)]
|
||||
9 | | S { s: Str<'a> },
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: field `s` does not have lifetime 'b
|
||||
--> $DIR/wrong_lifetime.rs:5:5
|
||||
--> tests/ui/borrow/wrong_lifetime.rs:5:5
|
||||
|
|
||||
5 | / #[serde(borrow = "'b")]
|
||||
6 | | s: &'a str,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: enum tags `conflict` for type and content conflict with each other
|
||||
--> $DIR/adjacent-tag.rs:4:1
|
||||
--> tests/ui/conflict/adjacent-tag.rs:4:1
|
||||
|
|
||||
4 | / #[serde(tag = "conflict", content = "conflict")]
|
||||
5 | | enum E {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(flatten)] cannot be used on newtype structs
|
||||
--> $DIR/flatten-newtype-struct.rs:6:12
|
||||
--> tests/ui/conflict/flatten-newtype-struct.rs:6:12
|
||||
|
|
||||
6 | struct Foo(#[serde(flatten)] HashMap<String, String>);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(flatten)] cannot be used on tuple structs
|
||||
--> $DIR/flatten-tuple-struct.rs:6:17
|
||||
--> tests/ui/conflict/flatten-tuple-struct.rs:6:17
|
||||
|
|
||||
6 | struct Foo(u32, #[serde(flatten)] HashMap<String, String>);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(from = "...")] and #[serde(try_from = "...")] conflict with each other
|
||||
--> $DIR/from-try-from.rs:4:1
|
||||
--> tests/ui/conflict/from-try-from.rs:4:1
|
||||
|
|
||||
4 | / #[serde(from = "u64", try_from = "u64")]
|
||||
5 | | struct S {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: variant field name `conflict` conflicts with internal tag
|
||||
--> $DIR/internal-tag-alias.rs:4:1
|
||||
--> tests/ui/conflict/internal-tag-alias.rs:4:1
|
||||
|
|
||||
4 | / #[serde(tag = "conflict")]
|
||||
5 | | enum E {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: variant field name `conflict` conflicts with internal tag
|
||||
--> $DIR/internal-tag.rs:4:1
|
||||
--> tests/ui/conflict/internal-tag.rs:4:1
|
||||
|
|
||||
4 | / #[serde(tag = "conflict")]
|
||||
5 | | enum E {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(default)] can only be used on structs with named fields
|
||||
--> $DIR/enum.rs:5:1
|
||||
--> tests/ui/default-attribute/enum.rs:5:1
|
||||
|
|
||||
5 | enum E {
|
||||
| ^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(default = "...")] can only be used on structs with named fields
|
||||
--> $DIR/enum_path.rs:5:1
|
||||
--> tests/ui/default-attribute/enum_path.rs:5:1
|
||||
|
|
||||
5 | enum E {
|
||||
| ^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(default)] can only be used on structs with named fields
|
||||
--> $DIR/nameless_struct_fields.rs:5:9
|
||||
--> tests/ui/default-attribute/nameless_struct_fields.rs:5:9
|
||||
|
|
||||
5 | struct T(u8, u8);
|
||||
| ^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(default = "...")] can only be used on structs with named fields
|
||||
--> $DIR/nameless_struct_fields_path.rs:5:9
|
||||
--> tests/ui/default-attribute/nameless_struct_fields_path.rs:5:9
|
||||
|
|
||||
5 | struct T(u8, u8);
|
||||
| ^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: unknown serde field attribute `serialize`
|
||||
--> $DIR/rename-and-ser.rs:5:27
|
||||
--> tests/ui/duplicate-attribute/rename-and-ser.rs:5:27
|
||||
|
|
||||
5 | #[serde(rename = "x", serialize = "y")]
|
||||
| ^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: duplicate serde attribute `rename`
|
||||
--> $DIR/rename-ser-rename-ser.rs:5:38
|
||||
--> tests/ui/duplicate-attribute/rename-ser-rename-ser.rs:5:38
|
||||
|
|
||||
5 | #[serde(rename(serialize = "x"), rename(serialize = "y"))]
|
||||
| ^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: duplicate serde attribute `rename`
|
||||
--> $DIR/rename-ser-rename.rs:6:13
|
||||
--> tests/ui/duplicate-attribute/rename-ser-rename.rs:6:13
|
||||
|
|
||||
6 | #[serde(rename = "y")]
|
||||
| ^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: duplicate serde attribute `rename`
|
||||
--> $DIR/rename-ser-ser.rs:5:37
|
||||
--> tests/ui/duplicate-attribute/rename-ser-ser.rs:5:37
|
||||
|
|
||||
5 | #[serde(rename(serialize = "x", serialize = "y"))]
|
||||
| ^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: duplicate serde attribute `rename`
|
||||
--> $DIR/two-rename-ser.rs:6:13
|
||||
--> tests/ui/duplicate-attribute/two-rename-ser.rs:6:13
|
||||
|
|
||||
6 | #[serde(rename(serialize = "y"))]
|
||||
| ^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: duplicate serde attribute `serialize_with`
|
||||
--> $DIR/with-and-serialize-with.rs:5:25
|
||||
--> tests/ui/duplicate-attribute/with-and-serialize-with.rs:5:25
|
||||
|
|
||||
5 | #[serde(with = "w", serialize_with = "s")]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(tag = "...", content = "...")] must be used together
|
||||
--> $DIR/content-no-tag.rs:4:9
|
||||
--> tests/ui/enum-representation/content-no-tag.rs:4:9
|
||||
|
|
||||
4 | #[serde(content = "c")]
|
||||
| ^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(tag = "...")] cannot be used with tuple variants
|
||||
--> $DIR/internal-tuple-variant.rs:6:5
|
||||
--> tests/ui/enum-representation/internal-tuple-variant.rs:6:5
|
||||
|
|
||||
6 | Tuple(u8, u8),
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
error: untagged enum cannot have #[serde(tag = "...", content = "...")]
|
||||
--> $DIR/untagged-and-adjacent.rs:4:9
|
||||
--> tests/ui/enum-representation/untagged-and-adjacent.rs:4:9
|
||||
|
|
||||
4 | #[serde(untagged)]
|
||||
| ^^^^^^^^
|
||||
|
||||
error: untagged enum cannot have #[serde(tag = "...", content = "...")]
|
||||
--> $DIR/untagged-and-adjacent.rs:5:9
|
||||
--> tests/ui/enum-representation/untagged-and-adjacent.rs:5:9
|
||||
|
|
||||
5 | #[serde(tag = "t", content = "c")]
|
||||
| ^^^
|
||||
|
||||
error: untagged enum cannot have #[serde(tag = "...", content = "...")]
|
||||
--> $DIR/untagged-and-adjacent.rs:5:20
|
||||
--> tests/ui/enum-representation/untagged-and-adjacent.rs:5:20
|
||||
|
|
||||
5 | #[serde(tag = "t", content = "c")]
|
||||
| ^^^^^^^
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
error: untagged enum cannot have #[serde(content = "...")]
|
||||
--> $DIR/untagged-and-content.rs:4:9
|
||||
--> tests/ui/enum-representation/untagged-and-content.rs:4:9
|
||||
|
|
||||
4 | #[serde(untagged)]
|
||||
| ^^^^^^^^
|
||||
|
||||
error: untagged enum cannot have #[serde(content = "...")]
|
||||
--> $DIR/untagged-and-content.rs:5:9
|
||||
--> tests/ui/enum-representation/untagged-and-content.rs:5:9
|
||||
|
|
||||
5 | #[serde(content = "c")]
|
||||
| ^^^^^^^
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
error: enum cannot be both untagged and internally tagged
|
||||
--> $DIR/untagged-and-internal.rs:4:9
|
||||
--> tests/ui/enum-representation/untagged-and-internal.rs:4:9
|
||||
|
|
||||
4 | #[serde(untagged)]
|
||||
| ^^^^^^^^
|
||||
|
||||
error: enum cannot be both untagged and internally tagged
|
||||
--> $DIR/untagged-and-internal.rs:5:9
|
||||
--> tests/ui/enum-representation/untagged-and-internal.rs:5:9
|
||||
|
|
||||
5 | #[serde(tag = "type")]
|
||||
| ^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(untagged)] can only be used on enums
|
||||
--> $DIR/untagged-struct.rs:5:1
|
||||
--> tests/ui/enum-representation/untagged-struct.rs:5:1
|
||||
|
|
||||
5 | struct S;
|
||||
| ^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: expected serde rename attribute to be a string: `rename = "..."`
|
||||
--> $DIR/boolean.rs:5:22
|
||||
--> tests/ui/expected-string/boolean.rs:5:22
|
||||
|
|
||||
5 | #[serde(rename = true)]
|
||||
| ^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: expected serde rename attribute to be a string: `rename = "..."`
|
||||
--> $DIR/byte_character.rs:5:22
|
||||
--> tests/ui/expected-string/byte_character.rs:5:22
|
||||
|
|
||||
5 | #[serde(rename = b'a')]
|
||||
| ^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: expected serde rename attribute to be a string: `rename = "..."`
|
||||
--> $DIR/byte_string.rs:5:22
|
||||
--> tests/ui/expected-string/byte_string.rs:5:22
|
||||
|
|
||||
5 | #[serde(rename = b"byte string")]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: expected serde rename attribute to be a string: `rename = "..."`
|
||||
--> $DIR/character.rs:5:22
|
||||
--> tests/ui/expected-string/character.rs:5:22
|
||||
|
|
||||
5 | #[serde(rename = 'a')]
|
||||
| ^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: expected serde rename attribute to be a string: `rename = "..."`
|
||||
--> $DIR/float.rs:5:22
|
||||
--> tests/ui/expected-string/float.rs:5:22
|
||||
|
|
||||
5 | #[serde(rename = 3.14)]
|
||||
| ^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: expected serde rename attribute to be a string: `rename = "..."`
|
||||
--> $DIR/integer.rs:5:22
|
||||
--> tests/ui/expected-string/integer.rs:5:22
|
||||
|
|
||||
5 | #[serde(rename = 100)]
|
||||
| ^^^
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
error: #[serde(field_identifier)] and #[serde(variant_identifier)] cannot both be set
|
||||
--> $DIR/both.rs:4:9
|
||||
--> tests/ui/identifier/both.rs:4:9
|
||||
|
|
||||
4 | #[serde(field_identifier, variant_identifier)]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
||||
error: #[serde(field_identifier)] and #[serde(variant_identifier)] cannot both be set
|
||||
--> $DIR/both.rs:4:27
|
||||
--> tests/ui/identifier/both.rs:4:27
|
||||
|
|
||||
4 | #[serde(field_identifier, variant_identifier)]
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(field_identifier)] can only be used on an enum
|
||||
--> $DIR/field_struct.rs:5:1
|
||||
--> tests/ui/identifier/field_struct.rs:5:1
|
||||
|
|
||||
5 | struct S;
|
||||
| ^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(field_identifier)] may only contain unit variants
|
||||
--> $DIR/field_tuple.rs:7:5
|
||||
--> tests/ui/identifier/field_tuple.rs:7:5
|
||||
|
|
||||
7 | B(u8, u8),
|
||||
| ^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: `Other` must be the last variant
|
||||
--> $DIR/newtype_not_last.rs:7:5
|
||||
--> tests/ui/identifier/newtype_not_last.rs:7:5
|
||||
|
|
||||
7 | Other(String),
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(other)] must be on a unit variant
|
||||
--> $DIR/not_unit.rs:7:5
|
||||
--> tests/ui/identifier/not_unit.rs:7:5
|
||||
|
|
||||
7 | / #[serde(other)]
|
||||
8 | | Other(u8, u8),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(other)] must be on the last variant
|
||||
--> $DIR/other_not_last.rs:7:5
|
||||
--> tests/ui/identifier/other_not_last.rs:7:5
|
||||
|
|
||||
7 | / #[serde(other)]
|
||||
8 | | Other,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(other)] cannot appear on untagged enum
|
||||
--> $DIR/other_untagged.rs:6:5
|
||||
--> tests/ui/identifier/other_untagged.rs:6:5
|
||||
|
|
||||
6 | / #[serde(other)]
|
||||
7 | | Other,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(other)] may not be used on a variant identifier
|
||||
--> $DIR/other_variant.rs:6:5
|
||||
--> tests/ui/identifier/other_variant.rs:6:5
|
||||
|
|
||||
6 | / #[serde(other)]
|
||||
7 | | Other,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(variant_identifier)] can only be used on an enum
|
||||
--> $DIR/variant_struct.rs:5:1
|
||||
--> tests/ui/identifier/variant_struct.rs:5:1
|
||||
|
|
||||
5 | struct S;
|
||||
| ^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(variant_identifier)] may only contain unit variants
|
||||
--> $DIR/variant_tuple.rs:7:5
|
||||
--> tests/ui/identifier/variant_tuple.rs:7:5
|
||||
|
|
||||
7 | B(u8, u8),
|
||||
| ^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: malformed bound attribute, expected `bound(serialize = ..., deserialize = ...)`
|
||||
--> $DIR/bound.rs:5:19
|
||||
--> tests/ui/malformed/bound.rs:5:19
|
||||
|
|
||||
5 | #[serde(bound(unknown))]
|
||||
| ^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: unexpected end of input, expected literal
|
||||
--> $DIR/cut_off.rs:4:17
|
||||
--> tests/ui/malformed/cut_off.rs:4:17
|
||||
|
|
||||
4 | #[serde(rename =)]
|
||||
| ^
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
error: expected #[serde(...)]
|
||||
--> $DIR/not_list.rs:4:3
|
||||
--> tests/ui/malformed/not_list.rs:4:3
|
||||
|
|
||||
4 | #[serde]
|
||||
| ^^^^^
|
||||
|
||||
error: expected #[serde(...)]
|
||||
--> $DIR/not_list.rs:5:3
|
||||
--> tests/ui/malformed/not_list.rs:5:3
|
||||
|
|
||||
5 | #[serde = "?"]
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: malformed rename attribute, expected `rename(serialize = ..., deserialize = ...)`
|
||||
--> $DIR/rename.rs:5:20
|
||||
--> tests/ui/malformed/rename.rs:5:20
|
||||
|
|
||||
5 | #[serde(rename(unknown))]
|
||||
| ^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: cannot deserialize when there is a lifetime parameter called 'de
|
||||
--> $DIR/deserialize_de_lifetime.rs:4:10
|
||||
--> tests/ui/precondition/deserialize_de_lifetime.rs:4:10
|
||||
|
|
||||
4 | struct S<'de> {
|
||||
| ^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: cannot deserialize a dynamically sized struct
|
||||
--> $DIR/deserialize_dst.rs:4:1
|
||||
--> tests/ui/precondition/deserialize_dst.rs:4:1
|
||||
|
|
||||
4 | / struct S {
|
||||
5 | | string: String,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: field identifiers cannot be serialized
|
||||
--> $DIR/serialize_field_identifier.rs:4:1
|
||||
--> tests/ui/precondition/serialize_field_identifier.rs:4:1
|
||||
|
|
||||
4 | / #[serde(field_identifier)]
|
||||
5 | | enum F {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: variant identifiers cannot be serialized
|
||||
--> $DIR/serialize_variant_identifier.rs:4:1
|
||||
--> tests/ui/precondition/serialize_variant_identifier.rs:4:1
|
||||
|
|
||||
4 | / #[serde(variant_identifier)]
|
||||
5 | | enum F {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: failed to parse path: "~~~"
|
||||
--> $DIR/bad_getter.rs:12:22
|
||||
--> tests/ui/remote/bad_getter.rs:12:22
|
||||
|
|
||||
12 | #[serde(getter = "~~~")]
|
||||
| ^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: failed to parse path: "~~~"
|
||||
--> $DIR/bad_remote.rs:10:18
|
||||
--> tests/ui/remote/bad_remote.rs:10:18
|
||||
|
|
||||
10 | #[serde(remote = "~~~")]
|
||||
| ^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(getter = "...")] is not allowed in an enum
|
||||
--> $DIR/enum_getter.rs:10:1
|
||||
--> tests/ui/remote/enum_getter.rs:10:1
|
||||
|
|
||||
10 | / #[serde(remote = "remote::E")]
|
||||
11 | | pub enum E {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0063]: missing field `b` in initializer of `remote::S`
|
||||
--> $DIR/missing_field.rs:11:18
|
||||
--> tests/ui/remote/missing_field.rs:11:18
|
||||
|
|
||||
11 | #[serde(remote = "remote::S")]
|
||||
| ^^^^^^^^^^^ missing `b`
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(getter = "...")] can only be used in structs that have #[serde(remote = "...")]
|
||||
--> $DIR/nonremote_getter.rs:4:1
|
||||
--> tests/ui/remote/nonremote_getter.rs:4:1
|
||||
|
|
||||
4 | / struct S {
|
||||
5 | | #[serde(getter = "S::get")]
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
error[E0609]: no field `b` on type `&remote::S`
|
||||
--> $DIR/unknown_field.rs:12:5
|
||||
--> tests/ui/remote/unknown_field.rs:12:5
|
||||
|
|
||||
12 | b: u8,
|
||||
| ^ help: a field with a similar name exists: `a`
|
||||
|
||||
error[E0560]: struct `remote::S` has no field named `b`
|
||||
--> $DIR/unknown_field.rs:12:5
|
||||
--> tests/ui/remote/unknown_field.rs:12:5
|
||||
|
|
||||
12 | b: u8,
|
||||
| ^ help: a field with a similar name exists: `a`
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/wrong_de.rs:7:10
|
||||
--> tests/ui/remote/wrong_de.rs:7:10
|
||||
|
|
||||
7 | #[derive(Deserialize)]
|
||||
| ^^^^^^^^^^^
|
||||
| |
|
||||
| expected `u16`, found `u8`
|
||||
| help: you can convert a `u8` to a `u16`: `Deserialize.into()`
|
||||
| ^^^^^^^^^^^ expected `u16`, found `u8`
|
||||
|
|
||||
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: you can convert a `u8` to a `u16`
|
||||
|
|
||||
7 | #[derive(Deserialize.into())]
|
||||
| +++++++
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/wrong_getter.rs:15:10
|
||||
--> tests/ui/remote/wrong_getter.rs:15:10
|
||||
|
|
||||
15 | #[derive(Serialize)]
|
||||
| ^^^^^^^^^ expected `u8`, found `u16`
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/wrong_ser.rs:9:10
|
||||
--> tests/ui/remote/wrong_ser.rs:9:10
|
||||
|
|
||||
9 | #[derive(Serialize)]
|
||||
| ^^^^^^^^^ expected `u8`, found `u16`
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: unknown rename rule `rename_all = "abc"`, expected one of "lowercase", "UPPERCASE", "PascalCase", "camelCase", "snake_case", "SCREAMING_SNAKE_CASE", "kebab-case", "SCREAMING-KEBAB-CASE"
|
||||
--> $DIR/container_unknown_rename_rule.rs:4:22
|
||||
--> tests/ui/rename/container_unknown_rename_rule.rs:4:22
|
||||
|
|
||||
4 | #[serde(rename_all = "abc")]
|
||||
| ^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: unknown rename rule `rename_all = "abc"`, expected one of "lowercase", "UPPERCASE", "PascalCase", "camelCase", "snake_case", "SCREAMING_SNAKE_CASE", "kebab-case", "SCREAMING-KEBAB-CASE"
|
||||
--> $DIR/variant_unknown_rename_rule.rs:5:26
|
||||
--> tests/ui/rename/variant_unknown_rename_rule.rs:5:26
|
||||
|
|
||||
5 | #[serde(rename_all = "abc")]
|
||||
| ^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(tag = "...")] can only be used on enums and structs with named fields
|
||||
--> $DIR/internally-tagged-tuple.rs:5:9
|
||||
--> tests/ui/struct-representation/internally-tagged-tuple.rs:5:9
|
||||
|
|
||||
5 | struct S(u8, u8);
|
||||
| ^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(tag = "...")] can only be used on enums and structs with named fields
|
||||
--> $DIR/internally-tagged-unit.rs:3:10
|
||||
--> tests/ui/struct-representation/internally-tagged-unit.rs:3:10
|
||||
|
|
||||
3 | #[derive(Serialize)]
|
||||
| ^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(transparent)] requires struct to have at most one transparent field
|
||||
--> $DIR/at_most_one.rs:4:1
|
||||
--> tests/ui/transparent/at_most_one.rs:4:1
|
||||
|
|
||||
4 | / #[serde(transparent)]
|
||||
5 | | struct S {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(transparent)] requires at least one field that is neither skipped nor has a default
|
||||
--> $DIR/de_at_least_one.rs:4:1
|
||||
--> tests/ui/transparent/de_at_least_one.rs:4:1
|
||||
|
|
||||
4 | / #[serde(transparent)]
|
||||
5 | | struct S {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(transparent)] is not allowed on an enum
|
||||
--> $DIR/enum.rs:4:1
|
||||
--> tests/ui/transparent/enum.rs:4:1
|
||||
|
|
||||
4 | / #[serde(transparent)]
|
||||
5 | | enum E {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(transparent)] requires at least one field that is not skipped
|
||||
--> $DIR/ser_at_least_one.rs:4:1
|
||||
--> tests/ui/transparent/ser_at_least_one.rs:4:1
|
||||
|
|
||||
4 | / #[serde(transparent)]
|
||||
5 | | struct S {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(transparent)] is not allowed on a unit struct
|
||||
--> $DIR/unit_struct.rs:4:1
|
||||
--> tests/ui/transparent/unit_struct.rs:4:1
|
||||
|
|
||||
4 | / #[serde(transparent)]
|
||||
5 | | struct S;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(transparent)] is not allowed with #[serde(from = "...")]
|
||||
--> $DIR/with_from.rs:4:1
|
||||
--> tests/ui/transparent/with_from.rs:4:1
|
||||
|
|
||||
4 | / #[serde(transparent, from = "u64")]
|
||||
5 | | struct S {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(transparent)] is not allowed with #[serde(into = "...")]
|
||||
--> $DIR/with_into.rs:4:1
|
||||
--> tests/ui/transparent/with_into.rs:4:1
|
||||
|
|
||||
4 | / #[serde(transparent, into = "u64")]
|
||||
5 | | struct S {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(transparent)] is not allowed with #[serde(try_from = "...")]
|
||||
--> $DIR/with_try_from.rs:4:1
|
||||
--> tests/ui/transparent/with_try_from.rs:4:1
|
||||
|
|
||||
4 | / #[serde(transparent, try_from = "u64")]
|
||||
5 | | struct S {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: failed to parse type: from = "Option<T"
|
||||
--> $DIR/from.rs:4:16
|
||||
--> tests/ui/type-attribute/from.rs:4:16
|
||||
|
|
||||
4 | #[serde(from = "Option<T")]
|
||||
| ^^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: failed to parse type: into = "Option<T"
|
||||
--> $DIR/into.rs:4:16
|
||||
--> tests/ui/type-attribute/into.rs:4:16
|
||||
|
|
||||
4 | #[serde(into = "Option<T")]
|
||||
| ^^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: failed to parse type: try_from = "Option<T"
|
||||
--> $DIR/try_from.rs:4:20
|
||||
--> tests/ui/type-attribute/try_from.rs:4:20
|
||||
|
|
||||
4 | #[serde(try_from = "Option<T")]
|
||||
| ^^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: unexpected literal in serde container attribute
|
||||
--> $DIR/container.rs:4:9
|
||||
--> tests/ui/unexpected-literal/container.rs:4:9
|
||||
|
|
||||
4 | #[serde("literal")]
|
||||
| ^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: unexpected literal in serde field attribute
|
||||
--> $DIR/field.rs:5:13
|
||||
--> tests/ui/unexpected-literal/field.rs:5:13
|
||||
|
|
||||
5 | #[serde("literal")]
|
||||
| ^^^^^^^^^
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user