diff options
| author | Smitty <me@smitop.com> | 2021-12-27 12:31:40 -0500 |
|---|---|---|
| committer | Smitty <me@smitop.com> | 2021-12-27 12:31:40 -0500 |
| commit | 9702348957083e1104776edcf897ca1808364869 (patch) | |
| tree | 6ac65fcbfc6caf3e8360cc518490c19c932b55eb /src/test/ui/macros/concat-bytes-error.rs | |
| parent | 31731511c0563d71289d29d1f53a21fe2fce5534 (diff) | |
| download | rust-9702348957083e1104776edcf897ca1808364869.tar.gz rust-9702348957083e1104776edcf897ca1808364869.zip | |
Clarify that repeat count must be positive
Diffstat (limited to 'src/test/ui/macros/concat-bytes-error.rs')
| -rw-r--r-- | src/test/ui/macros/concat-bytes-error.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/ui/macros/concat-bytes-error.rs b/src/test/ui/macros/concat-bytes-error.rs index 2c7997d5e59..db5d3cab0bd 100644 --- a/src/test/ui/macros/concat-bytes-error.rs +++ b/src/test/ui/macros/concat-bytes-error.rs @@ -39,12 +39,12 @@ fn main() { ]); concat_bytes!(5u16); //~ ERROR cannot concatenate numeric literals concat_bytes!([5u16]); //~ ERROR numeric literal is not a `u8` - concat_bytes!([3; ()]); //~ ERROR repeat count is not a number - concat_bytes!([3; -2]); //~ ERROR repeat count is not a number - concat_bytes!([pie; -2]); //~ ERROR repeat count is not a number + concat_bytes!([3; ()]); //~ ERROR repeat count is not a positive number + concat_bytes!([3; -2]); //~ ERROR repeat count is not a positive number + concat_bytes!([pie; -2]); //~ ERROR repeat count is not a positive number concat_bytes!([pie; 2]); //~ ERROR expected a byte literal concat_bytes!([2.2; 0]); //~ ERROR cannot concatenate float literals - concat_bytes!([5.5; ()]); //~ ERROR repeat count is not a number + concat_bytes!([5.5; ()]); //~ ERROR repeat count is not a positive number concat_bytes!([[1, 2, 3]; 3]); //~ ERROR cannot concatenate doubly nested array concat_bytes!([[42; 2]; 3]); //~ ERROR cannot concatenate doubly nested array } |
