diff options
| author | Bruno Dutra <brunocodutra@gmail.com> | 2018-09-03 20:03:14 +0200 |
|---|---|---|
| committer | Bruno Dutra <brunocodutra@gmail.com> | 2018-09-03 20:03:14 +0200 |
| commit | 05cdf8dc3d490fbec2519de90b254f47ec7373e8 (patch) | |
| tree | 153fcc2d7845009a285eb63705fdc7434df98e80 /src/librustc/mir | |
| parent | 61a999a531d03c73626716e2b48d259e13f3b6af (diff) | |
| download | rust-05cdf8dc3d490fbec2519de90b254f47ec7373e8.tar.gz rust-05cdf8dc3d490fbec2519de90b254f47ec7373e8.zip | |
Document snapshot.rs
Diffstat (limited to 'src/librustc/mir')
| -rw-r--r-- | src/librustc/mir/interpret/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/librustc/mir/interpret/mod.rs b/src/librustc/mir/interpret/mod.rs index 9b7087ca034..ccc5bba1ad6 100644 --- a/src/librustc/mir/interpret/mod.rs +++ b/src/librustc/mir/interpret/mod.rs @@ -133,6 +133,11 @@ pub trait PointerArithmetic: layout::HasDataLayout { impl<T: layout::HasDataLayout> PointerArithmetic for T {} +/// Pointer is generic over the type that represents a reference to Allocations, +/// thus making it possible for the most convenient representation to be used in +/// each context. +/// +/// Defaults to the index based and loosely coupled AllocId. #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, RustcEncodable, RustcDecodable, Hash)] pub struct Pointer<Id=AllocId> { pub alloc_id: Id, |
