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.
This commit is contained in:
commit
3fc5bd7abc
12 changed files with 421 additions and 0 deletions
|
@ -439,6 +439,7 @@ symbols! {
|
|||
compiler_builtins,
|
||||
compiler_fence,
|
||||
concat,
|
||||
concat_bytes,
|
||||
concat_idents,
|
||||
conservative_impl_trait,
|
||||
console,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue