diff options
| author | Jared Roesch <roeschinc@gmail.com> | 2015-07-24 13:39:11 -0700 |
|---|---|---|
| committer | Jared Roesch <jroesch@MacBook.home> | 2015-07-25 20:05:42 -0700 |
| commit | 55621b6199dcef7090bdbb660a5ab9354b3effa6 (patch) | |
| tree | f1a353116a88e0e35e64f9b8548b2f09e2f6e582 /src/libsyntax | |
| parent | 9da04b2bd1fdcd147f6d0ebcdbb5108f63bf7576 (diff) | |
| download | rust-55621b6199dcef7090bdbb660a5ab9354b3effa6.tar.gz rust-55621b6199dcef7090bdbb660a5ab9354b3effa6.zip | |
Add feature gate
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index ee895fb1a96..af7e4a6855f 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -163,6 +163,8 @@ const KNOWN_FEATURES: &'static [(&'static str, &'static str, Status)] = &[ // Allows the definition recursive static items. ("static_recursion", "1.3.0", Active), +// Allows default type parameters to influence type inference. + ("default_type_parameter_fallback", "1.3.0", Active) ]; // (changing above list without updating src/doc/reference.md makes @cmr sad) @@ -341,7 +343,8 @@ pub struct Features { /// #![feature] attrs for non-language (library) features pub declared_lib_features: Vec<(InternedString, Span)>, pub const_fn: bool, - pub static_recursion: bool + pub static_recursion: bool, + pub default_type_parameter_fallback: bool, } impl Features { @@ -366,7 +369,8 @@ impl Features { declared_stable_lang_features: Vec::new(), declared_lib_features: Vec::new(), const_fn: false, - static_recursion: false + static_recursion: false, + default_type_parameter_fallback: false, } } } @@ -865,6 +869,7 @@ fn check_crate_inner<F>(cm: &CodeMap, span_handler: &SpanHandler, declared_lib_features: unknown_features, 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"), } } |
