diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-09-09 18:36:11 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-09-09 18:36:11 +0530 |
| commit | c9f291e4bb664c0cbc5693bb4ec0a5821077393d (patch) | |
| tree | 9082d1c46a366ef13532c688a20828eba6d27d4c /src/libstd | |
| parent | 4fc09d3a15d18ee15897fa90ad93dc2cef37c919 (diff) | |
| parent | acea5f4c82fa8ae084606b5383562f3dc3357d90 (diff) | |
| download | rust-c9f291e4bb664c0cbc5693bb4ec0a5821077393d.tar.gz rust-c9f291e4bb664c0cbc5693bb4ec0a5821077393d.zip | |
Rollup merge of #28289 - shepmaster:include_bytes-docs, r=alexcrichton
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 `()`
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/macros.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index e4866982176..a0c3f013f2b 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -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), /// |
