Skip to content

Commit

Permalink
tweak failing examples
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Apr 5, 2023
1 parent f683003 commit 038ea2a
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions hex-literal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,21 @@ assert_eq!(bytes1, bytes2);

Using an unsupported character inside literals will result in a compilation error:
```rust,compile_fail
# use hex_literal::hex;
hex!("АА"); // Cyrillic "А"
hex!("11 22"); // Japanese space
hex!("0123 // Сomments inside literals are not supported");
hex_literal::hex!("АА"); // Cyrillic "А"
hex_literal::hex!("11 22"); // Japanese space
```

Сomments inside literals are not supported:
```rust,compile_fail
hex_literal::hex!("0123 // foo");
```

Every literal must contain an even number of hex characters:
```rust,compile_fail
hex_literal::hex!(
"01234"
"567"
);
```

## Minimum Supported Rust Version
Expand Down

0 comments on commit 038ea2a

Please sign in to comment.