File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -744,20 +744,20 @@ pub fn drop<T>(_x: T) { }
744
744
/// bar: u8,
745
745
/// }
746
746
///
747
- /// let foo_slice = [10u8];
747
+ /// let foo_array = [10u8];
748
748
///
749
749
/// unsafe {
750
- /// // Copy the data from 'foo_slice ' and treat it as a 'Foo'
751
- /// let mut foo_struct: Foo = mem::transmute_copy(&foo_slice );
750
+ /// // Copy the data from 'foo_array ' and treat it as a 'Foo'
751
+ /// let mut foo_struct: Foo = mem::transmute_copy(&foo_array );
752
752
/// assert_eq!(foo_struct.bar, 10);
753
753
///
754
754
/// // Modify the copied data
755
755
/// foo_struct.bar = 20;
756
756
/// assert_eq!(foo_struct.bar, 20);
757
757
/// }
758
758
///
759
- /// // The contents of 'foo_slice ' should not have changed
760
- /// assert_eq!(foo_slice , [10]);
759
+ /// // The contents of 'foo_array ' should not have changed
760
+ /// assert_eq!(foo_array , [10]);
761
761
/// ```
762
762
#[ inline]
763
763
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
You can’t perform that action at this time.
0 commit comments