@@ -123,7 +123,7 @@ use crate::fmt::{self, Write};
123
123
/// the `Debug` output means `Report` is an ideal starting place for formatting errors returned
124
124
/// from `main`.
125
125
///
126
- /// ```should_panic
126
+ /// ```
127
127
/// #![feature(error_reporter)]
128
128
/// use std::error::Report;
129
129
/// # use std::error::Error;
@@ -154,9 +154,8 @@ use crate::fmt::{self, Write};
154
154
/// # Err(SuperError { source: SuperErrorSideKick })
155
155
/// # }
156
156
///
157
- /// fn main() -> Result<(), Report<SuperError>> {
158
- /// get_super_error()?;
159
- /// Ok(())
157
+ /// fn main() {
158
+ /// assert!(get_super_error().is_err());
160
159
/// }
161
160
/// ```
162
161
///
@@ -170,7 +169,7 @@ use crate::fmt::{self, Write};
170
169
/// output format. If you want to make sure your `Report`s are pretty printed and include backtrace
171
170
/// you will need to manually convert and enable those flags.
172
171
///
173
- /// ```should_panic
172
+ /// ```
174
173
/// #![feature(error_reporter)]
175
174
/// use std::error::Report;
176
175
/// # use std::error::Error;
@@ -201,11 +200,11 @@ use crate::fmt::{self, Write};
201
200
/// # Err(SuperError { source: SuperErrorSideKick })
202
201
/// # }
203
202
///
204
- /// fn main() -> Result<(), Report<SuperError>> {
205
- /// get_super_error()
203
+ /// fn main() {
204
+ /// let ret = get_super_error()
206
205
/// .map_err(Report::from)
207
- /// .map_err(|r| r.pretty(true).show_backtrace(true))? ;
208
- /// Ok( ())
206
+ /// .map_err(|r| r.pretty(true).show_backtrace(true));
207
+ /// assert!(ret.is_err ());
209
208
/// }
210
209
/// ```
211
210
///
0 commit comments