Skip to content

Commit dc499b0

Browse files
committed
Merge rust-bitcoin#4471: Change rustdoc tag from compile_fail to ignore
f5b716b Change rustdoc tag from compile_fail to ignore (Jamil Lambert, PhD) Pull request description: 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` Closes rust-bitcoin#4259 ACKs for top commit: apoelstra: ACK f5b716b; successfully ran local tests Tree-SHA512: 41d14d45f12f989f5875490311a135372325a3bd626cfcea0767de32c14873348c639d14c4774219fca60de712772bb1922ad1b572435f4b5b1e318e1049620c
2 parents 41f26cf + f5b716b commit dc499b0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

internals/src/slice.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ pub trait SliceExt {
99
///
1010
/// Note that `N` must not be zero:
1111
///
12-
/// ```compile_fail
12+
/// ```ignore
1313
/// # use bitcoin_internals::slice::SliceExt;
1414
/// let slice = [1, 2, 3];
15-
/// let _fail = slice.bitcoin_as_chunks::<0>();
15+
/// let _fail = slice.bitcoin_as_chunks::<0>(); // Fails to compile
1616
/// ```
1717
fn bitcoin_as_chunks<const N: usize>(&self) -> (&[[Self::Item; N]], &[Self::Item]);
1818

1919
/// Splits up the slice into a slice of arrays and a remainder.
2020
///
2121
/// Note that `N` must not be zero:
2222
///
23-
/// ```compile_fail
23+
/// ```ignore
2424
/// # use bitcoin_internals::slice::SliceExt;
2525
/// let mut slice = [1, 2, 3];
26-
/// let _fail = slice.bitcoin_as_chunks_mut::<0>();
26+
/// let _fail = slice.bitcoin_as_chunks_mut::<0>(); // Fails to compile
2727
/// ```
2828
fn bitcoin_as_chunks_mut<const N: usize>(
2929
&mut self,

0 commit comments

Comments
 (0)