diff options
| author | Kevin Ballard <kevin@sb.org> | 2014-01-17 22:30:36 -0800 |
|---|---|---|
| committer | Kevin Ballard <kevin@sb.org> | 2014-05-18 13:03:38 -0700 |
| commit | bcabcf53cfe2a86ebf02aa762b8ab7278060ce10 (patch) | |
| tree | 5a0ce4fec2100f41123572573abfde840bc1b2f3 /src/rustllvm/PassWrapper.cpp | |
| parent | 134f797a6309e8f284372c745689bcde17829c30 (diff) | |
| download | rust-bcabcf53cfe2a86ebf02aa762b8ab7278060ce10.tar.gz rust-bcabcf53cfe2a86ebf02aa762b8ab7278060ce10.zip | |
Make bytes!() return 'static
Change `bytes!()` to return
{
static BYTES: &'static [u8] = &[...];
BYTES
}
This gives it the `'static` lifetime, whereas before it had an rvalue
lifetime. Until recently this would have prevented assigning `bytes!()`
to a static, as in
static FOO: &'static [u8] = bytes!(1,2,3);
but #14183 fixed it so blocks are now allowed in constant expressions
(with restrictions).
Fixes #11641.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
