diff options
| author | bors <bors@rust-lang.org> | 2016-10-23 02:10:28 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-23 02:10:28 -0700 |
| commit | 87af2324bb43ca5fa2689da0560d116399b3456a (patch) | |
| tree | 47c5712039c65a52320813bc973c41e7747d5b27 /src/libstd | |
| parent | 40f79ba8c99ca7d9935182eadb89443df86f72bf (diff) | |
| parent | 34576da9355b5de993e3d08a317f00240f53c5b1 (diff) | |
| download | rust-87af2324bb43ca5fa2689da0560d116399b3456a.tar.gz rust-87af2324bb43ca5fa2689da0560d116399b3456a.zip | |
Auto merge of #37325 - newpavlov:master, r=frewsxcv
libcore documentation for builtin macros Fixes: #36272 Additionally I've edited docstring for `include!` a bit. (related PR #36404) Unfortunately it seems there is no sane way to reexport empty macros definitions for their docstrings. To avoid copying the whole documentation for builtin macros I've only copied description and added links to `std` macro pages.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/macros.rs | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 40e5dd6ba19..d801fa028cc 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -381,9 +381,11 @@ pub mod builtin { /// Includes a utf8-encoded file as a string. /// + /// The file is located relative to the current file. (similarly to how + /// modules are found) + /// /// This macro will yield an expression of type `&'static str` which is the - /// contents of the filename specified. The file is located relative to the - /// current file (similarly to how modules are found), + /// contents of the file. /// /// # Examples /// @@ -396,9 +398,11 @@ pub mod builtin { /// Includes a file as a reference to a byte array. /// + /// The file is located relative to the current file. (similarly to how + /// modules are found) + /// /// 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), + /// the contents of the file. /// /// # Examples /// @@ -452,9 +456,10 @@ pub mod builtin { #[macro_export] macro_rules! cfg { ($($cfg:tt)*) => ({ /* compiler built-in */ }) } - /// Parse the file provided in the argument as an expression or an - /// item according to the context. This file is located relative - /// to the current file (similarly to how modules are found). + /// Parse a file as an expression or an item according to the context. + /// + /// The file is located relative to the current file. (similarly to how + /// modules are found) /// /// Using this macro is often a bad idea, because if the file is /// parsed as an expression, it is going to be placed in the |
