Skip to content

Commit f5c61a7

Browse files
committed
Rollup merge of #23496 - steveklabnik:gh22309, r=nikomatsakis
Fixes #22309 I am pretty sure that this is the right way to do this, given the other macros, but I'm not 100% sure.
2 parents 19b40f7 + f8c63d0 commit f5c61a7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/libstd/macros.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,4 +404,18 @@ pub mod builtin {
404404
/// ```
405405
#[macro_export]
406406
macro_rules! cfg { ($cfg:tt) => ({ /* compiler built-in */ }) }
407+
408+
/// Parse the current given file as an expression.
409+
///
410+
/// This is generally a bad idea, because it's going to behave unhygenically.
411+
///
412+
/// # Examples
413+
///
414+
/// ```ignore
415+
/// fn foo() {
416+
/// include!("/path/to/a/file")
417+
/// }
418+
/// ```
419+
#[macro_export]
420+
macro_rules! include { ($cfg:tt) => ({ /* compiler built-in */ }) }
407421
}

0 commit comments

Comments
 (0)