Skip to content

Commit

Permalink
Add non-utf8 byte to the bytes!() example
Browse files Browse the repository at this point in the history
Only an example was needed, as the ability to write uints into the string is
already mentioned.

Fix #7102.
  • Loading branch information
tbu- committed May 20, 2014
1 parent f9bd6b4 commit 84f43c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libstd/macros.rs
Expand Up @@ -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 */ }) )
Expand Down

5 comments on commit 84f43c6

@bors
Copy link
Contributor

@bors bors commented on 84f43c6 May 21, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from huonw
at tbu-@84f43c6

@bors
Copy link
Contributor

@bors bors commented on 84f43c6 May 21, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging tbu-/rust/pr_doc_bytes = 84f43c6 into auto

@bors
Copy link
Contributor

@bors bors commented on 84f43c6 May 21, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbu-/rust/pr_doc_bytes = 84f43c6 merged ok, testing candidate = e546452

@bors
Copy link
Contributor

@bors bors commented on 84f43c6 May 21, 2014

@bors
Copy link
Contributor

@bors bors commented on 84f43c6 May 21, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = e546452

Please sign in to comment.