File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 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) { }
744744/// bar: u8,
745745/// }
746746///
747- /// let foo_slice = [10u8];
747+ /// let foo_array = [10u8];
748748///
749749/// 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 );
752752/// assert_eq!(foo_struct.bar, 10);
753753///
754754/// // Modify the copied data
755755/// foo_struct.bar = 20;
756756/// assert_eq!(foo_struct.bar, 20);
757757/// }
758758///
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]);
761761/// ```
762762#[ inline]
763763#[ stable( feature = "rust1" , since = "1.0.0" ) ]
You can’t perform that action at this time.
0 commit comments