Skip to content

Commit 84f43c6

Browse files
committed
Add non-utf8 byte to the bytes!() example
Only an example was needed, as the ability to write uints into the string is already mentioned. Fix #7102.
1 parent f9bd6b4 commit 84f43c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libstd/macros.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,9 @@ pub mod builtin {
471471
/// # Example
472472
///
473473
/// ```
474-
/// let rust = bytes!("r", 'u', "st");
474+
/// let rust = bytes!("r", 'u', "st", 255);
475475
/// assert_eq!(rust[1], 'u' as u8);
476+
/// assert_eq!(rust[5], 255);
476477
/// ```
477478
#[macro_export]
478479
macro_rules! bytes( ($($e:expr),*) => ({ /* compiler built-in */ }) )

0 commit comments

Comments
 (0)