Skip to content

Commit 038ea2a

Browse files
committed
tweak failing examples
1 parent f683003 commit 038ea2a

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

hex-literal/README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,21 @@ assert_eq!(bytes1, bytes2);
4747

4848
Using an unsupported character inside literals will result in a compilation error:
4949
```rust,compile_fail
50-
# use hex_literal::hex;
51-
hex!("АА"); // Cyrillic "А"
52-
hex!("11 22"); // Japanese space
53-
hex!("0123 // Сomments inside literals are not supported");
50+
hex_literal::hex!("АА"); // Cyrillic "А"
51+
hex_literal::hex!("11 22"); // Japanese space
52+
```
53+
54+
Сomments inside literals are not supported:
55+
```rust,compile_fail
56+
hex_literal::hex!("0123 // foo");
57+
```
58+
59+
Every literal must contain an even number of hex characters:
60+
```rust,compile_fail
61+
hex_literal::hex!(
62+
"01234"
63+
"567"
64+
);
5465
```
5566

5667
## Minimum Supported Rust Version

0 commit comments

Comments
 (0)