Skip to content

Commit dbec032

Browse files
committed
Work around nightly rustc breaking type inference
It seems there was a type inference regression in Nightly rustc, where returning an Ok literal at the end of a function whose type signature returns a Result is failing. I also hit this on some other projects.
1 parent 056c97f commit dbec032

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/cfi.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ pub trait UnwindSection<'input, Endian>
304304
/// # let do_stuff_with = |_| unimplemented!();
305305
/// do_stuff_with(unwind_info);
306306
/// # let _ = ctx;
307-
/// # Ok(())
307+
/// # unreachable!()
308308
/// # }
309309
/// ```
310310
fn unwind_info_for_address<'bases>
@@ -571,7 +571,7 @@ impl BaseAddresses {
571571
/// while let Some(entry) = try!(entries.next()) {
572572
/// do_stuff_with(entry)
573573
/// }
574-
/// # Ok(())
574+
/// # unreachable!()
575575
/// # }
576576
/// ```
577577
#[derive(Clone, Debug)]
@@ -1263,7 +1263,7 @@ impl<'input, Endian, Section> FrameDescriptionEntry<'input, Endian, Section>
12631263
/// // programs.
12641264
/// let ctx = ctx.reset();
12651265
/// # let _ = ctx;
1266-
/// # Ok(())
1266+
/// # unreachable!()
12671267
/// # }
12681268
/// ```
12691269
///

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
//! }
4949
//! }
5050
//! }
51-
//! # Ok(())
51+
//! # unreachable!()
5252
//! # }
5353
//! ```
5454
//!

src/unit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2264,7 +2264,7 @@ impl<'input, 'abbrev, 'unit, Endian> EntriesCursor<'input, 'abbrev, 'unit, Endia
22642264
///
22652265
/// let mut tree = try!(unit.entries_tree(&abbrevs, None));
22662266
/// try!(process_tree(tree.iter()));
2267-
/// # Ok(())
2267+
/// # unreachable!()
22682268
/// # }
22692269
///
22702270
/// fn process_tree<E>(mut iter: gimli::EntriesTreeIter<E>) -> gimli::Result<()>

0 commit comments

Comments
 (0)