diff options
| author | Aaron Turon <aturon@mozilla.com> | 2014-05-02 10:41:07 -0700 |
|---|---|---|
| committer | Aaron Turon <aturon@mozilla.com> | 2014-05-05 15:24:36 -0700 |
| commit | c00d8fd9a07244a13d1cc7162a80c3d618935ce8 (patch) | |
| tree | 377273474798d8fae7931491ccddab89b81efd2c /src/rustllvm/RustWrapper.cpp | |
| parent | b733df0fc7942aea205d8fc451d2a4d17d47dfe9 (diff) | |
| download | rust-c00d8fd9a07244a13d1cc7162a80c3d618935ce8.tar.gz rust-c00d8fd9a07244a13d1cc7162a80c3d618935ce8.zip | |
Add (unsafe) coercion from bits to std::bitflags
The intent of `std::bitflags` is to allow building type-safe wrappers around C-style flags APIs. But in addition to construction these flags from the Rust side, we need a way to convert them from the C side. This patch adds a `from_bits` function, which is unsafe since the bits in question may not represent a valid combination of flags.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
