Skip to content

Commit fd664ee

Browse files
committed
Include diagnostics regression
ref rust-lang/rust#119273
1 parent b8d09a7 commit fd664ee

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

tests/compile-fail/invalid_serializer.stderr

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,35 @@ error[E0432]: unresolved import `not_string`
7979
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no external crate `not_string`
8080
|
8181
= 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

Comments
 (0)