Skip to content

Commit

Permalink
Include diagnostics regression
Browse files Browse the repository at this point in the history
  • Loading branch information
jhpratt committed Mar 23, 2024
1 parent b8d09a7 commit fd664ee
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions tests/compile-fail/invalid_serializer.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,35 @@ error[E0432]: unresolved import `not_string`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no external crate `not_string`
|
= note: this error originates in the macro `serde::format_description` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0391]: cycle detected when computing type of opaque `my_format::description::{opaque#0}`
--> ../tests/compile-fail/invalid_serializer.rs:14:1
|
14 | serde::format_description!(my_format, OffsetDateTime, not_string); // string format wrong type
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: ...which requires borrow-checking `my_format::description`...
--> ../tests/compile-fail/invalid_serializer.rs:14:1
|
14 | serde::format_description!(my_format, OffsetDateTime, not_string); // string format wrong type
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires promoting constants in MIR for `my_format::description`...
--> ../tests/compile-fail/invalid_serializer.rs:14:1
|
14 | serde::format_description!(my_format, OffsetDateTime, not_string); // string format wrong type
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires const checking `my_format::description`...
--> ../tests/compile-fail/invalid_serializer.rs:14:1
|
14 | serde::format_description!(my_format, OffsetDateTime, not_string); // string format wrong type
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which requires computing whether `my_format::description::{opaque#0}` is freeze...
= note: ...which requires evaluating trait selection obligation `my_format::description::{opaque#0}: core::marker::Freeze`...
= note: ...which again requires computing type of opaque `my_format::description::{opaque#0}`, completing the cycle
note: cycle used when computing type of `my_format::description::{opaque#0}`
--> ../tests/compile-fail/invalid_serializer.rs:14:1
|
14 | serde::format_description!(my_format, OffsetDateTime, not_string); // string format wrong type
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= 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
= note: this error originates in the macro `serde::format_description` (in Nightly builds, run with -Z macro-backtrace for more info)

0 comments on commit fd664ee

Please sign in to comment.