]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #14590 : pcwalton/rust/overloaded-call, r=nick29581
authorbors <bors@rust-lang.org>
Tue, 10 Jun 2014 00:37:08 +0000 (17:37 -0700)
committerbors <bors@rust-lang.org>
Tue, 10 Jun 2014 00:37:08 +0000 (17:37 -0700)
gate.

This is part of unboxed closures.

r? @nick29581

1  2 
src/librustc/front/feature_gate.rs

index 11dd6a86cd811df749a1f9fdbd6538d6f4e113ac,5edee5ea2ef735bc17ff1828e17f8bc9c74983ee..a9b9892c2c9c33a514e3b40d818451fc084dc582
@@@ -46,7 -46,7 +46,7 @@@ static KNOWN_FEATURES: &'static [(&'sta
      ("thread_local", Active),
      ("link_args", Active),
      ("phase", Active),
 -    ("macro_registrar", Active),
 +    ("plugin_registrar", Active),
      ("log_syntax", Active),
      ("trace_macros", Active),
      ("concat_idents", Active),
@@@ -56,6 -56,7 +56,7 @@@
      ("quote", Active),
      ("linkage", Active),
      ("struct_inherit", Active),
+     ("overloaded_calls", Active),
  
      ("quad_precision_float", Active),
  
@@@ -86,6 -87,7 +87,7 @@@ pub struct Features 
      pub default_type_params: Cell<bool>,
      pub quad_precision_float: Cell<bool>,
      pub issue_5723_bootstrap: Cell<bool>,
+     pub overloaded_calls: Cell<bool>,
  }
  
  impl Features {
@@@ -94,6 -96,7 +96,7 @@@
              default_type_params: Cell::new(false),
              quad_precision_float: Cell::new(false),
              issue_5723_bootstrap: Cell::new(false),
+             overloaded_calls: Cell::new(false),
          }
      }
  }
@@@ -192,9 -195,10 +195,9 @@@ impl<'a> Visitor<()> for Context<'a> 
              }
  
              ast::ItemFn(..) => {
 -                if attr::contains_name(i.attrs.as_slice(), "macro_registrar") {
 -                    self.gate_feature("macro_registrar", i.span,
 -                                      "cross-crate macro exports are \
 -                                       experimental and possibly buggy");
 +                if attr::contains_name(i.attrs.as_slice(), "plugin_registrar") {
 +                    self.gate_feature("plugin_registrar", i.span,
 +                                      "compiler plugins are experimental and possibly buggy");
                  }
              }
  
@@@ -375,4 -379,5 +378,5 @@@ pub fn check_crate(sess: &Session, krat
      sess.features.default_type_params.set(cx.has_feature("default_type_params"));
      sess.features.quad_precision_float.set(cx.has_feature("quad_precision_float"));
      sess.features.issue_5723_bootstrap.set(cx.has_feature("issue_5723_bootstrap"));
+     sess.features.overloaded_calls.set(cx.has_feature("overloaded_calls"));
  }