Skip to content

Commit

Permalink
Add compile_fail to ensure doctests pass in the new test crate. (#1038
Browse files Browse the repository at this point in the history
)
  • Loading branch information
obi1kenobi authored Dec 11, 2024
1 parent 4106eea commit ea70a4c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
/// }
Expand Down Expand Up @@ -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;
/// }
Expand Down

0 comments on commit ea70a4c

Please # to comment.