mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-23 01:18:02 +00:00
Ui tests with compile_error resolved at call site
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
error: failed to parse path: "~~~"
|
||||
--> tests/ui/remote/bad_getter.rs:12:22
|
||||
|
|
||||
9 | #[derive(Serialize)]
|
||||
| --------- in this derive macro expansion
|
||||
...
|
||||
12 | #[serde(getter = "~~~")]
|
||||
| ^^^^^
|
||||
|
|
||||
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
error: failed to parse path: "~~~"
|
||||
--> tests/ui/remote/bad_remote.rs:10:18
|
||||
|
|
||||
9 | #[derive(Serialize)]
|
||||
| --------- in this derive macro expansion
|
||||
10 | #[serde(remote = "~~~")]
|
||||
| ^^^^^
|
||||
|
|
||||
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
error: remove generic parameters from this path
|
||||
--> tests/ui/remote/double_generic.rs:11:18
|
||||
|
|
||||
10 | #[derive(Serialize, Deserialize)]
|
||||
| --------- in this derive macro expansion
|
||||
11 | #[serde(remote = "remote::StructGeneric<u8>")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: remove generic parameters from this path
|
||||
--> tests/ui/remote/double_generic.rs:11:18
|
||||
|
|
||||
10 | #[derive(Serialize, Deserialize)]
|
||||
| ----------- in this derive macro expansion
|
||||
11 | #[serde(remote = "remote::StructGeneric<u8>")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
error: #[serde(getter = "...")] is not allowed in an enum
|
||||
--> tests/ui/remote/enum_getter.rs:10:1
|
||||
|
|
||||
9 | #[derive(Serialize)]
|
||||
| --------- in this derive macro expansion
|
||||
10 | / #[serde(remote = "remote::E")]
|
||||
11 | | pub enum E {
|
||||
12 | | A {
|
||||
@@ -9,3 +11,5 @@ error: #[serde(getter = "...")] is not allowed in an enum
|
||||
15 | | },
|
||||
16 | | }
|
||||
| |_^
|
||||
|
|
||||
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
error: #[serde(getter = "...")] can only be used in structs that have #[serde(remote = "...")]
|
||||
--> tests/ui/remote/nonremote_getter.rs:4:1
|
||||
|
|
||||
3 | #[derive(Serialize)]
|
||||
| --------- in this derive macro expansion
|
||||
4 | / struct S {
|
||||
5 | | #[serde(getter = "S::get")]
|
||||
6 | | a: u8,
|
||||
7 | | }
|
||||
| |_^
|
||||
|
|
||||
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
Reference in New Issue
Block a user