Skip to content

Commit 54a09d0

Browse files
committed
---
yaml --- r: 236299 b: refs/heads/master c: b30d896 h: refs/heads/master i: 236297: 6114453 236295: ef6e34e v: v3
1 parent accb349 commit 54a09d0

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 85f48d300a1161338e14b9579007b003c48dc4ba
2+
refs/heads/master: b30d8969e86fa2c9dd3b8e2e28ddda2202331f0f
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
44
refs/heads/try: ea3892f76a2180dd4ce724f1dafd9186959702d9
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/src/libcore/array.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ use slice::{Iter, IterMut, SliceExt};
3535
///
3636
/// This trait can be used to implement other traits on fixed-size arrays
3737
/// without causing much metadata bloat.
38+
///
39+
/// The trait is marked unsafe in order to restrict implementors to fixed-size
40+
/// arrays. User of this trait can assume that implementors have the exact
41+
/// layout in memory of a fixed size array (for example, for unsafe
42+
/// initialization).
43+
///
44+
/// Note that the traits AsRef and AsMut provide similar methods for types that
45+
/// may not be fixed-size arrays. Implementors should prefer those traits
46+
/// instead.
3847
pub unsafe trait FixedSizeArray<T> {
3948
/// Converts the array to immutable slice
4049
fn as_slice(&self) -> &[T];

0 commit comments

Comments
 (0)