Skip to content

Commit

Permalink
Auto merge of #36404 - christopherdumas:master, r=GuillaumeGomez
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Oct 2, 2016
2 parents 791fb77 + 3660a79 commit 8991ffc
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/libstd/macros.rs
Expand Up @@ -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
///
Expand Down

0 comments on commit 8991ffc

Please sign in to comment.