From ea70a4ceb38033a65db722cce63b3f5d8246304f Mon Sep 17 00:00:00 2001 From: Predrag Gruevski <2348618+obi1kenobi@users.noreply.github.com> Date: Wed, 11 Dec 2024 00:05:34 -0500 Subject: [PATCH] Add `compile_fail` to ensure doctests pass in the new test crate. (#1038) --- .../enum_discriminant_no_longer_defined/new/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test_crates/enum_discriminant_no_longer_defined/new/src/lib.rs b/test_crates/enum_discriminant_no_longer_defined/new/src/lib.rs index 6f43bbd3..6bb5aa9f 100644 --- a/test_crates/enum_discriminant_no_longer_defined/new/src/lib.rs +++ b/test_crates/enum_discriminant_no_longer_defined/new/src/lib.rs @@ -12,8 +12,8 @@ // // error: aborting due to 1 previous error // -// To see this, run the following doctest: -/// ```rust +// To see this, remove `compile_fail` and then run the following doctest: +/// ```rust,compile_fail /// fn example(value: enum_discriminant_no_longer_defined::GainsNonExhaustiveVariant) { /// value as isize; /// } @@ -48,8 +48,8 @@ pub enum NonUnitVariantButGainsNonExhaustiveVariant { // | // = note: see https://doc.rust-lang.org/reference/items/enumerations.html#casting for more information // -// To see this, run the following doctest: -/// ```rust +// To see this, remove `compile_fail` and then run the following doctest: +/// ```rust,compile_fail /// fn example(value: enum_discriminant_no_longer_defined::GainsTupleVariant) { /// value as isize; /// }