diff options
| author | Tobias Bucher <tobiasbucher5991@gmail.com> | 2014-05-20 22:53:30 +0200 |
|---|---|---|
| committer | Tobias Bucher <tobiasbucher5991@gmail.com> | 2014-05-20 22:53:30 +0200 |
| commit | 84f43c6acd58c6c64fb1d0fde09f55e496d67332 (patch) | |
| tree | 00c6ae15e00e497087600989df3ac6fba9e249b8 /src/libstd | |
| parent | f9bd6b4e3900da77f06ebad04ae6bada1e26e042 (diff) | |
| download | rust-84f43c6acd58c6c64fb1d0fde09f55e496d67332.tar.gz rust-84f43c6acd58c6c64fb1d0fde09f55e496d67332.zip | |
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.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/macros.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ 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 */ }) ) |
