mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 02:03:53 +00:00
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 `()`
This commit is contained in:
commit
c9f291e4bb
@ -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),
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user