提交 acea5f4c 编写于 作者: J Jake Goulding

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 `()`
上级 7bf626a6
......@@ -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),
///
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册