Skip to content

Commit 30e5a30

Browse files
author
Jorge Aparicio
committed
add Pod marker
1 parent 6a7d82e commit 30e5a30

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/libcore/marker.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ pub trait Sized : MarkerTrait {
5151
// Empty.
5252
}
5353

54+
#[cfg(stage0)]
5455
/// Types that can be copied by simply copying bits (i.e. `memcpy`).
5556
///
5657
/// By default, variable bindings have 'move semantics.' In other
@@ -156,6 +157,20 @@ pub trait Copy : MarkerTrait {
156157
// Empty.
157158
}
158159

160+
/// TODO(japaric) docs
161+
#[cfg(not(stage0))]
162+
#[lang="copy"]
163+
pub trait Copy: Pod {
164+
// Empty
165+
}
166+
167+
/// TODO(japaric) docs
168+
#[cfg(not(stage0))]
169+
#[lang="pod"]
170+
pub trait Pod: MarkerTrait {
171+
// Empty
172+
}
173+
159174
/// Types that can be safely shared between threads when aliased.
160175
///
161176
/// The precise definition is: a type `T` is `Sync` if `&T` is

0 commit comments

Comments
 (0)