mirror of https://github.com/rust-lang/reference
Rename include_bin! to include_bytes!
According to [RFC 344][], methods that return `&[u8]` should have names ending in `bytes`. Though `include_bin!` is a macro not a method, it seems reasonable to follow the convention anyway. We keep the old name around for now, but trigger a deprecation warning when it is used. [RFC 344]: https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md [breaking-change]
This commit is contained in:
parent
04eb31cd5e
commit
db2d99e7a2
|
@ -640,7 +640,7 @@ names, and invoked through a consistent syntax: `name!(...)`. Examples include:
|
|||
* `stringify!` : pretty-print the Rust expression given as an argument
|
||||
* `include!` : include the Rust expression in the given file
|
||||
* `include_str!` : include the contents of the given file as a string
|
||||
* `include_bin!` : include the contents of the given file as a binary blob
|
||||
* `include_bytes!` : include the contents of the given file as a binary blob
|
||||
* `error!`, `warn!`, `info!`, `debug!` : provide diagnostic information.
|
||||
|
||||
All of the above extensions are expressions with values.
|
||||
|
|
Loading…
Reference in New Issue