mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
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.
This commit is contained in:
parent
f9bd6b4e39
commit
84f43c6acd
@ -471,8 +471,9 @@ pub mod builtin {
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// let rust = bytes!("r", 'u', "st");
|
||||
/// let rust = bytes!("r", 'u', "st", 255);
|
||||
/// assert_eq!(rust[1], 'u' as u8);
|
||||
/// assert_eq!(rust[5], 255);
|
||||
/// ```
|
||||
#[macro_export]
|
||||
macro_rules! bytes( ($($e:expr),*) => ({ /* compiler built-in */ }) )
|
||||
|
Loading…
Reference in New Issue
Block a user