diff options
Diffstat (limited to 'src/test/ui/traits/issue-72455.rs')
-rw-r--r-- | src/test/ui/traits/issue-72455.rs | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/test/ui/traits/issue-72455.rs b/src/test/ui/traits/issue-72455.rs deleted file mode 100644 index b6c3bb222..000000000 --- a/src/test/ui/traits/issue-72455.rs +++ /dev/null @@ -1,27 +0,0 @@ -// check-pass - -pub trait ResultExt { - type Ok; - fn err_eprint_and_ignore(self) -> Option<Self::Ok>; -} - -impl<O, E> ResultExt for std::result::Result<O, E> -where - E: std::error::Error, -{ - type Ok = O; - fn err_eprint_and_ignore(self) -> Option<O> - where - Self: , - { - match self { - Err(e) => { - eprintln!("{}", e); - None - } - Ok(o) => Some(o), - } - } -} - -fn main() {} |