Skip to content

Commit c9f291e

Browse files
committed
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 `()`
2 parents 4fc09d3 + acea5f4 commit c9f291e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libstd/macros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,9 +412,9 @@ pub mod builtin {
412412
#[macro_export]
413413
macro_rules! include_str { ($file:expr) => ({ /* compiler built-in */ }) }
414414

415-
/// Includes a file as a byte slice.
415+
/// Includes a file as a reference to a byte array.
416416
///
417-
/// This macro will yield an expression of type `&'static [u8]` which is
417+
/// This macro will yield an expression of type `&'static [u8; N]` which is
418418
/// the contents of the filename specified. The file is located relative to
419419
/// the current file (similarly to how modules are found),
420420
///

0 commit comments

Comments
 (0)