File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 21
21
//! 3. To actually perform the feature gate, you'll want to have code that looks
22
22
//! like:
23
23
//!
24
- //! ```rust,ignore
24
+ //! ```rust,compile_fail
25
25
//! use core::{Feature, Features};
26
26
//!
27
27
//! let feature = Feature::launch_into_space();
Original file line number Diff line number Diff line change @@ -73,9 +73,12 @@ fn maybe_spurious(err: &Error) -> bool {
73
73
///
74
74
/// # Examples
75
75
///
76
- /// ```ignore
77
- /// use util::network;
78
- /// cargo_result = network::with_retry(&config, || something.download());
76
+ /// ```
77
+ /// # use crate::cargo::util::{CargoResult, Config};
78
+ /// # let download_something = || return Ok(());
79
+ /// # let config = Config::default().unwrap();
80
+ /// use cargo::util::network;
81
+ /// let cargo_result = network::with_retry(&config, || download_something());
79
82
/// ```
80
83
pub fn with_retry < T , F > ( config : & Config , mut callback : F ) -> CargoResult < T >
81
84
where
You can’t perform that action at this time.
0 commit comments