Clarify that include_bytes! returns a reference to an array, not just a slice

This can be shown with the example code

```rust
fn main() {
    let () = include_bytes!("/etc/hosts");
}

Which will have the error:

expected `&[u8; 195]`,
    found `()`
This commit is contained in:
Jake Goulding
2015-09-07 20:01:14 -04:00
parent 7bf626a680
commit acea5f4c82

View File

@@ -412,9 +412,9 @@ pub mod builtin {
#[macro_export]
macro_rules! include_str { ($file:expr) => ({ /* compiler built-in */ }) }
/// Includes a file as a byte slice.
/// Includes a file as a reference to a byte array.
///
/// This macro will yield an expression of type `&'static [u8]` which is
/// This macro will yield an expression of type `&'static [u8; N]` which is
/// the contents of the filename specified. The file is located relative to
/// the current file (similarly to how modules are found),
///