diff options
| author | bors <bors@rust-lang.org> | 2016-10-02 08:32:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-02 08:32:07 -0700 |
| commit | 8991ffc3031b4e787f9216caa12aa556f5ede8ed (patch) | |
| tree | 8826503690624dcefc68d1e83f39fa0c1126b064 /src/libstd | |
| parent | 791fb778ccfb3dc831d99544093a9d4e3cf82a49 (diff) | |
| parent | 3660a790fbfeaadde80e0846b91005465f384b1e (diff) | |
| download | rust-8991ffc3031b4e787f9216caa12aa556f5ede8ed.tar.gz rust-8991ffc3031b4e787f9216caa12aa556f5ede8ed.zip | |
Auto merge of #36404 - christopherdumas:master, r=GuillaumeGomez
Documentation change to macros.rs for `includes!` I'm not sure if this documentation is clear or extensive enough, but this is just to get started on the problem, fixes issue #36387.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/macros.rs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index c78840bd42b..8946af8af53 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -450,9 +450,16 @@ pub mod builtin { #[macro_export] macro_rules! cfg { ($($cfg:tt)*) => ({ /* compiler built-in */ }) } - /// Parse the current given file as an expression. - /// - /// This is generally a bad idea, because it's going to behave unhygienically. + /// 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). + /// + /// 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 + /// surrounding code unhygenically. This could result in variables + /// or functions being different from what the file expected if + /// there are variables or functions that have the same name in + /// the current file. /// /// # Examples /// |
