Skip to content

Instantly share code, notes, and snippets.

@bharrisau
bharrisau / register.rs
Last active August 29, 2015 14:03 — forked from bgamari/register.rs
#![feature(unsafe_destructor)]
use std::ty::Unsafe;
use std::kinds::marker::InvariantType;
/// This represents a register
struct RegValue<Packed, Unpacked> {
value: Unsafe<Packed>,
}