From c26e9a24da14c813ddb00484c5499b7c55b15f4b Mon Sep 17 00:00:00 2001 From: Daniel Wagner-Hall Date: Sat, 31 Dec 2022 21:59:36 +0000 Subject: [PATCH] Add beta- and nightly-specific expected stderr It looks like some commit started reporting conflicting trait impls using an un-qualified trait name, rather than a fully qualified one. This is a minor cosmetic detail, as far as these tests are concerned. We should be able to unify these again when 1.67 hits stable in a few weeks. --- .../conflicting_default.stderr_beta | 9 +++++++++ .../conflicting_default.stderr_nightly | 9 +++++++++ .../conflicting_derive.stderr_beta | 20 +++++++++++++++++++ .../conflicting_derive.stderr_nightly | 20 +++++++++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 num_enum/tests/try_build/compile_fail/conflicting_default.stderr_beta create mode 100644 num_enum/tests/try_build/compile_fail/conflicting_default.stderr_nightly create mode 100644 num_enum/tests/try_build/compile_fail/conflicting_derive.stderr_beta create mode 100644 num_enum/tests/try_build/compile_fail/conflicting_derive.stderr_nightly diff --git a/num_enum/tests/try_build/compile_fail/conflicting_default.stderr_beta b/num_enum/tests/try_build/compile_fail/conflicting_default.stderr_beta new file mode 100644 index 0000000..69b8872 --- /dev/null +++ b/num_enum/tests/try_build/compile_fail/conflicting_default.stderr_beta @@ -0,0 +1,9 @@ +error[E0119]: conflicting implementations of trait `Default` for type `Number` + --> tests/try_build/compile_fail/conflicting_default.rs:1:19 + | +1 | #[derive(Default, num_enum::Default)] + | ------- ^^^^^^^^^^^^^^^^^ conflicting implementation for `Number` + | | + | first implementation here + | + = note: this error originates in the derive macro `num_enum::Default` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/num_enum/tests/try_build/compile_fail/conflicting_default.stderr_nightly b/num_enum/tests/try_build/compile_fail/conflicting_default.stderr_nightly new file mode 100644 index 0000000..69b8872 --- /dev/null +++ b/num_enum/tests/try_build/compile_fail/conflicting_default.stderr_nightly @@ -0,0 +1,9 @@ +error[E0119]: conflicting implementations of trait `Default` for type `Number` + --> tests/try_build/compile_fail/conflicting_default.rs:1:19 + | +1 | #[derive(Default, num_enum::Default)] + | ------- ^^^^^^^^^^^^^^^^^ conflicting implementation for `Number` + | | + | first implementation here + | + = note: this error originates in the derive macro `num_enum::Default` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/num_enum/tests/try_build/compile_fail/conflicting_derive.stderr_beta b/num_enum/tests/try_build/compile_fail/conflicting_derive.stderr_beta new file mode 100644 index 0000000..679eb06 --- /dev/null +++ b/num_enum/tests/try_build/compile_fail/conflicting_derive.stderr_beta @@ -0,0 +1,20 @@ +error[E0119]: conflicting implementations of trait `TryFromPrimitive` for type `Numbers` + --> tests/try_build/compile_fail/conflicting_derive.rs:1:35 + | +1 | #[derive(num_enum::FromPrimitive, num_enum::TryFromPrimitive)] + | ----------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Numbers` + | | + | first implementation here + | + = note: this error originates in the derive macro `num_enum::TryFromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0119]: conflicting implementations of trait `TryFrom` for type `Numbers` + --> tests/try_build/compile_fail/conflicting_derive.rs:1:35 + | +1 | #[derive(num_enum::FromPrimitive, num_enum::TryFromPrimitive)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: conflicting implementation in crate `core`: + - impl TryFrom for T + where U: Into; + = note: this error originates in the derive macro `num_enum::TryFromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/num_enum/tests/try_build/compile_fail/conflicting_derive.stderr_nightly b/num_enum/tests/try_build/compile_fail/conflicting_derive.stderr_nightly new file mode 100644 index 0000000..679eb06 --- /dev/null +++ b/num_enum/tests/try_build/compile_fail/conflicting_derive.stderr_nightly @@ -0,0 +1,20 @@ +error[E0119]: conflicting implementations of trait `TryFromPrimitive` for type `Numbers` + --> tests/try_build/compile_fail/conflicting_derive.rs:1:35 + | +1 | #[derive(num_enum::FromPrimitive, num_enum::TryFromPrimitive)] + | ----------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Numbers` + | | + | first implementation here + | + = note: this error originates in the derive macro `num_enum::TryFromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0119]: conflicting implementations of trait `TryFrom` for type `Numbers` + --> tests/try_build/compile_fail/conflicting_derive.rs:1:35 + | +1 | #[derive(num_enum::FromPrimitive, num_enum::TryFromPrimitive)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: conflicting implementation in crate `core`: + - impl TryFrom for T + where U: Into; + = note: this error originates in the derive macro `num_enum::TryFromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info)