Skip to content

Commit ef879c6

Browse files
committed
fix broken doctest
1 parent 720e987 commit ef879c6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/core/src/option.rs

+1
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,7 @@ impl<T> Option<T> {
715715
/// _expect_ the `Option` should be `Some`.
716716
///
717717
/// ```should_panic
718+
/// # let slice: &[u8] = &[];
718719
/// let item = slice.get(0)
719720
/// .expect("slice should not be empty");
720721
/// ```

0 commit comments

Comments
 (0)