diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-12-09 05:08:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-09 05:08:30 +0100 |
| commit | 3fc5bd7abc2878f65a3c3dbc594874bae369cdf8 (patch) | |
| tree | e34d5a0968600fd8b634636456cc9db7f3800a9c /compiler/rustc_codegen_gcc | |
| parent | 3c857f48ce12d1f98f3ea6d48eb9e33d8d60c985 (diff) | |
| parent | eb56693a370df5bb60f58f73586cded6a641b0cc (diff) | |
| download | rust-3fc5bd7abc2878f65a3c3dbc594874bae369cdf8.tar.gz rust-3fc5bd7abc2878f65a3c3dbc594874bae369cdf8.zip | |
Rollup merge of #87599 - Smittyvb:concat_bytes, r=Mark-Simulacrum
Implement concat_bytes!
This implements the unstable `concat_bytes!` macro, which has tracking issue #87555. It can be used like:
```rust
#![feature(concat_bytes)]
fn main() {
assert_eq!(concat_bytes!(), &[]);
assert_eq!(concat_bytes!(b'A', b"BC", [68, b'E', 70]), b"ABCDEF");
}
```
If strings or characters are used where byte strings or byte characters are required, it suggests adding a `b` prefix. If a number is used outside of an array it suggests arrayifying it. If a boolean is used it suggests replacing it with the numeric value of that number. Doubly nested arrays of bytes are disallowed.
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions
