From 84f43c6acd58c6c64fb1d0fde09f55e496d67332 Mon Sep 17 00:00:00 2001 From: Tobias Bucher Date: Tue, 20 May 2014 22:53:30 +0200 Subject: [PATCH] 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. --- src/libstd/macros.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 9d1fd230f5c..1c616bdcbbf 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -471,8 +471,9 @@ macro_rules! option_env( ($name:expr) => ({ /* compiler built-in */ }) ) /// # 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 */ }) )