Skip to content

Commit 5e2bfda

Browse files
committed
Fix error in example by adding type annotation
1 parent 6e099a6 commit 5e2bfda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/liballoc/boxed.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ impl<'a, T: Copy> From<&'a [T]> for Box<[T]> {
479479
/// ```rust
480480
/// // create a &[u8] which will be used to create a Box<[u8]>
481481
/// let slice: &[u8] = &[104, 101, 108, 108, 111];
482-
/// let boxed_slice = Box::from(slice);
482+
/// let boxed_slice: Box<[u8]> = Box::from(slice);
483483
///
484484
/// println!("{:?}", boxed_slice);
485485
/// ```

0 commit comments

Comments
 (0)