diff options
| author | bors <bors@rust-lang.org> | 2015-08-06 19:11:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-08-06 19:11:17 +0000 |
| commit | 11deb083f5bc3e57e73fc82de4bef7b1d4dad7b1 (patch) | |
| tree | 0f575e98b114fe6b854a1fd53ff1f7749ba3621c /src/libsyntax/feature_gate.rs | |
| parent | fb92de75c1c4b7eaaf5d425fb2587407c00701fc (diff) | |
| parent | 83e43bb728b95d52039824d63b1ba5bbde5c5d7b (diff) | |
| download | rust-11deb083f5bc3e57e73fc82de4bef7b1d4dad7b1.tar.gz rust-11deb083f5bc3e57e73fc82de4bef7b1d4dad7b1.zip | |
Auto merge of #27296 - jroesch:type-macros, r=huonw
This pull request implements the functionality for [RFC 873](https://github.com/rust-lang/rfcs/blob/master/text/0873-type-macros.md). This is currently just an update of @freebroccolo's branch from January, the corresponding commits are linked in each commit message. @nikomatsakis and I had talked about updating the macro language to support a lifetime fragment specifier, and it is possible to do that work on this branch as well. If so we can (collectively) talk about it next week during the pre-RustCamp work week.
Diffstat (limited to 'src/libsyntax/feature_gate.rs')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 4a1b74d89d0..dd6fc7ebd0c 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -172,6 +172,9 @@ const KNOWN_FEATURES: &'static [(&'static str, &'static str, Status)] = &[ // Allows associated type defaults ("associated_type_defaults", "1.2.0", Active), + // Allows macros to appear in the type position. + + ("type_macros", "1.3.0", Active), ]; // (changing above list without updating src/doc/reference.md makes @cmr sad) @@ -354,6 +357,7 @@ pub struct Features { pub const_fn: bool, pub static_recursion: bool, pub default_type_parameter_fallback: bool, + pub type_macros: bool, } impl Features { @@ -380,6 +384,7 @@ impl Features { const_fn: false, static_recursion: false, default_type_parameter_fallback: false, + type_macros: false, } } } @@ -883,6 +888,7 @@ fn check_crate_inner<F>(cm: &CodeMap, span_handler: &SpanHandler, const_fn: cx.has_feature("const_fn"), static_recursion: cx.has_feature("static_recursion"), default_type_parameter_fallback: cx.has_feature("default_type_parameter_fallback"), + type_macros: cx.has_feature("type_macros"), } } |
