@@ -25,16 +25,6 @@ supported as inputs:
25
25
26
26
- byte string literals (` b"..." ` )
27
27
- byte literals (` b'b' ` )
28
- - numeric literals – must fit in ` u8 ` , any number larger than ` u8::MAX ` causes
29
- a compile time error like the following:
30
-
31
- ```
32
- error: cannot concatenate a non-`u8` literal in a byte string literal
33
- --> $FILE:XX:YY
34
- |
35
- XX | concat_bytes!(256, b"val");
36
- | ^^^ this value is larger than `255`
37
- ```
38
28
- numeric array literals – if any literal is outside of ` u8 ` range, it will
39
29
cause a compile time error:
40
30
@@ -64,6 +54,11 @@ string literals, like a previous revision of this RFC proposed. This would make
64
54
it hard to ensure the right output type is produced – users would have to use
65
55
hacks like adding a dummy ` b"" ` argument to force a byte literal output.
66
56
57
+ An earlier version of this RFC proposed to support integer literals outside of
58
+ arrays, but that was rejected since it would make the output of
59
+ ` byte_concat!(123, b"\n") ` inconsistent with the equivalent ` concat! `
60
+ invocation.
61
+
67
62
# Unresolved questions
68
63
[ unresolved-questions ] : #unresolved-questions
69
64
@@ -72,8 +67,3 @@ hacks like adding a dummy `b""` argument to force a byte literal output.
72
67
support those as well (support ` &[0, 1, 2] ` in addition to ` [0, 1, 2] ` ).
73
68
- What to do with string and character literals? They could either be supported
74
69
with their underlying UTF-8 representation being concatenated, or rejected.
75
- - If supported, it would probably make sense to also support boolean literals
76
- so ` concat_bytes!() ` supports all inputs ` concat!() ` does.
77
- - If rejected, it would probably makes sense to also reject boolean literals
78
- to avoid any possible confusion about their representation (` true ` and
79
- ` false ` vs. ` 1 ` and ` 0 ` ).
0 commit comments