From d9e8dd9a4907d832825fcee07ea8bc16aa59afbc Mon Sep 17 00:00:00 2001 From: Daniel Wagner-Hall Date: Thu, 8 Apr 2021 21:51:46 +0100 Subject: [PATCH] Fix nightly test expectation https://github.com/rust-lang/rust/pull/83954 removed the trailing :. --- num_enum/tests/try_build.rs | 4 ++-- .../conflicting_derive.stderr_nightly | 20 +++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 num_enum/tests/try_build/compile_fail/conflicting_derive.stderr_nightly diff --git a/num_enum/tests/try_build.rs b/num_enum/tests/try_build.rs index 97661f6..6058f5d 100644 --- a/num_enum/tests/try_build.rs +++ b/num_enum/tests/try_build.rs @@ -34,10 +34,10 @@ impl Renamer { const STDERR_EXTENSION: &'static str = "stderr"; #[rustversion::all(beta)] - const VERSION_SPECIFIC_EXTENSION: &'static str = "stderr_nightly"; + const VERSION_SPECIFIC_EXTENSION: &'static str = "stderr_beta"; #[rustversion::all(nightly)] - const VERSION_SPECIFIC_EXTENSION: &'static str = "stderr_beta"; + const VERSION_SPECIFIC_EXTENSION: &'static str = "stderr_nightly"; #[rustversion::all(not(beta), not(nightly))] const VERSION_SPECIFIC_EXTENSION: &'static str = "stderr_doesnotexist"; 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..eb1cdd9 --- /dev/null +++ b/num_enum/tests/try_build/compile_fail/conflicting_derive.stderr_nightly @@ -0,0 +1,20 @@ +error[E0119]: conflicting implementations of trait `std::convert::TryFrom` for type `Numbers` + --> $DIR/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 a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0119]: conflicting implementations of trait `num_enum::TryFromPrimitive` for type `Numbers` + --> $DIR/conflicting_derive.rs:1:10 + | +1 | #[derive(num_enum::FromPrimitive, num_enum::TryFromPrimitive)] + | ^^^^^^^^^^^^^^^^^^^^^^^ -------------------------- first implementation here + | | + | conflicting implementation for `Numbers` + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)