File: fix-tests.patch

package info (click to toggle)
rust-minus 5.6.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,192 kB
  • sloc: makefile: 2
file content (32 lines) | stat: -rw-r--r-- 956 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -31,7 +31,8 @@
 //!
 //! ## Threads
 //!
-//! ```rust,no_run
+#![cfg_attr(feature = "dynamic_output", doc = r#"```rust,no_run"#)]
+#![cfg_attr(not(feature = "dynamic_output"), doc = r#"```rust,compile_fail"#)]
 //! use minus::{dynamic_paging, MinusError, Pager};
 //! use std::{
 //!     fmt::Write,
@@ -57,7 +58,8 @@
 //!
 //! ## tokio
 //!
-//! ```rust,no_run
+#![cfg_attr(feature = "dynamic_output", doc = r#"```rust,no_run"#)]
+#![cfg_attr(not(feature = "dynamic_output"), doc = r#"```rust,compile_fail"#)]
 //! use minus::{dynamic_paging, MinusError, Pager};
 //! use std::time::Duration;
 //! use std::fmt::Write;
@@ -90,7 +92,8 @@
 //! ```
 //!
 //! ## Static output
-//! ```rust,no_run
+#![cfg_attr(feature = "static_output", doc = r#"```rust,no_run"#)]
+#![cfg_attr(not(feature = "static_output"), doc = r#"```rust,compile_fail"#)]
 //! use std::fmt::Write;
 //! use minus::{MinusError, Pager, page_all};
 //!