@@ -79,3 +79,35 @@ error[E0432]: unresolved import `not_string`
79
79
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no external crate `not_string`
80
80
|
81
81
= note: this error originates in the macro `serde::format_description` (in Nightly builds, run with -Z macro-backtrace for more info)
82
+
83
+ error[E0391]: cycle detected when computing type of opaque `my_format::description::{opaque#0}`
84
+ --> ../tests/compile-fail/invalid_serializer.rs:14:1
85
+ |
86
+ 14 | serde::format_description!(my_format, OffsetDateTime, not_string); // string format wrong type
87
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88
+ |
89
+ note: ...which requires borrow-checking `my_format::description`...
90
+ --> ../tests/compile-fail/invalid_serializer.rs:14:1
91
+ |
92
+ 14 | serde::format_description!(my_format, OffsetDateTime, not_string); // string format wrong type
93
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
94
+ note: ...which requires promoting constants in MIR for `my_format::description`...
95
+ --> ../tests/compile-fail/invalid_serializer.rs:14:1
96
+ |
97
+ 14 | serde::format_description!(my_format, OffsetDateTime, not_string); // string format wrong type
98
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
99
+ note: ...which requires const checking `my_format::description`...
100
+ --> ../tests/compile-fail/invalid_serializer.rs:14:1
101
+ |
102
+ 14 | serde::format_description!(my_format, OffsetDateTime, not_string); // string format wrong type
103
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104
+ = note: ...which requires computing whether `my_format::description::{opaque#0}` is freeze...
105
+ = note: ...which requires evaluating trait selection obligation `my_format::description::{opaque#0}: core::marker::Freeze`...
106
+ = note: ...which again requires computing type of opaque `my_format::description::{opaque#0}`, completing the cycle
107
+ note: cycle used when computing type of `my_format::description::{opaque#0}`
108
+ --> ../tests/compile-fail/invalid_serializer.rs:14:1
109
+ |
110
+ 14 | serde::format_description!(my_format, OffsetDateTime, not_string); // string format wrong type
111
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112
+ = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
113
+ = note: this error originates in the macro `serde::format_description` (in Nightly builds, run with -Z macro-backtrace for more info)
0 commit comments