Change rustdoc tag from compile_fail to ignore

The example code is supposed to fail to compile, but if it does run it
panics. This somehow confuses the compiler so that either the
compile_fail tag compiles but causes a lint warning about the panic or
using should_panic fails to compile.

Change the tag to ignore
This commit is contained in:
Jamil Lambert, PhD 2025-05-08 12:51:47 +01:00
parent 41f26cf090
commit f5b716b099
No known key found for this signature in database
GPG Key ID: 54DC29234AB5D2C0
1 changed files with 4 additions and 4 deletions

View File

@ -9,10 +9,10 @@ pub trait SliceExt {
/// ///
/// Note that `N` must not be zero: /// Note that `N` must not be zero:
/// ///
/// ```compile_fail /// ```ignore
/// # use bitcoin_internals::slice::SliceExt; /// # use bitcoin_internals::slice::SliceExt;
/// let slice = [1, 2, 3]; /// let slice = [1, 2, 3];
/// let _fail = slice.bitcoin_as_chunks::<0>(); /// let _fail = slice.bitcoin_as_chunks::<0>(); // Fails to compile
/// ``` /// ```
fn bitcoin_as_chunks<const N: usize>(&self) -> (&[[Self::Item; N]], &[Self::Item]); fn bitcoin_as_chunks<const N: usize>(&self) -> (&[[Self::Item; N]], &[Self::Item]);
@ -20,10 +20,10 @@ pub trait SliceExt {
/// ///
/// Note that `N` must not be zero: /// Note that `N` must not be zero:
/// ///
/// ```compile_fail /// ```ignore
/// # use bitcoin_internals::slice::SliceExt; /// # use bitcoin_internals::slice::SliceExt;
/// let mut slice = [1, 2, 3]; /// let mut slice = [1, 2, 3];
/// let _fail = slice.bitcoin_as_chunks_mut::<0>(); /// let _fail = slice.bitcoin_as_chunks_mut::<0>(); // Fails to compile
/// ``` /// ```
fn bitcoin_as_chunks_mut<const N: usize>( fn bitcoin_as_chunks_mut<const N: usize>(
&mut self, &mut self,