From fd664eef0dd6bf4ca729ece9f4bfd8c4bd96ef82 Mon Sep 17 00:00:00 2001 From: Jacob Pratt Date: Sat, 23 Mar 2024 18:04:59 -0400 Subject: [PATCH] Include diagnostics regression ref rust-lang/rust#119273 --- tests/compile-fail/invalid_serializer.stderr | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/compile-fail/invalid_serializer.stderr b/tests/compile-fail/invalid_serializer.stderr index 2f73f41ef..3579ac33c 100644 --- a/tests/compile-fail/invalid_serializer.stderr +++ b/tests/compile-fail/invalid_serializer.stderr @@ -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)