Skip to content

Commit 5d31a81

Browse files
Fix use of result_unwrap_or_default feature
1 parent 0958505 commit 5d31a81

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/libcore/result.rs

+2
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,8 @@ impl<T: Default, E> Result<T, E> {
807807
/// `Err` on error.
808808
///
809809
/// ```
810+
/// #![feature(result_unwrap_or_default)]
811+
///
810812
/// let good_year_from_input = "1909";
811813
/// let bad_year_from_input = "190blarg";
812814
/// let good_year = good_year_from_input.parse().unwrap_or_default();

src/libcoretest/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#![feature(unique)]
3535
#![feature(iter_max_by)]
3636
#![feature(iter_min_by)]
37+
#![feature(result_unwrap_or_default)]
3738

3839
extern crate core;
3940
extern crate test;

src/libcoretest/result.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(result_unwrap_or_default)]
12-
1311
fn op1() -> Result<isize, &'static str> { Ok(666) }
1412
fn op2() -> Result<isize, &'static str> { Err("sadface") }
1513

0 commit comments

Comments
 (0)