about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-05-18 13:06:30 -0700
committerbors <bors@rust-lang.org>2014-05-18 13:06:30 -0700
commitea87f126bdf8de4acc4f74c14ac0ae10d95a2472 (patch)
tree98c8d99c9429a56f99e739be540b5cff5fe8ddbb /src/rustllvm/PassWrapper.cpp
parent63287eef27b1a23a1fc24a7b4453eb7bd8ec1f11 (diff)
parentbcabcf53cfe2a86ebf02aa762b8ab7278060ce10 (diff)
downloadrust-ea87f126bdf8de4acc4f74c14ac0ae10d95a2472.tar.gz
rust-ea87f126bdf8de4acc4f74c14ac0ae10d95a2472.zip
auto merge of #14275 : kballard/rust/bytes-return-static, r=huonw
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