1. 07 3月, 2015 1 次提交
    • K
      Make #[derive(Anything)] into sugar for #[derive_Anything] · 491054f0
      Keegan McAllister 提交于
      This is a hack, but I don't think we can do much better as long as `derive` is
      running at the syntax expansion phase.
      
      If the custom_derive feature gate is enabled, this works with user-defined
      traits and syntax extensions. Without the gate, you can't use e.g. #[derive_Clone]
      directly, so this does not change the stable language.
      
      This commit also cleans up the deriving code somewhat, and forbids some
      previously-meaningless attribute syntax. For this reason it's technically a
      
          [breaking-change]
      491054f0
  2. 05 3月, 2015 1 次提交
    • H
      Add #[allow_internal_unstable] to track stability for macros better. · 84b060ce
      Huon Wilson 提交于
      Unstable items used in a macro expansion will now always trigger
      stability warnings, *unless* the unstable items are directly inside a
      macro marked with `#[allow_internal_unstable]`. IOW, the compiler warns
      unless the span of the unstable item is a subspan of the definition of a
      macro marked with that attribute.
      
      E.g.
      
          #[allow_internal_unstable]
          macro_rules! foo {
              ($e: expr) => {{
                  $e;
                  unstable(); // no warning
                  only_called_by_foo!();
              }}
          }
      
          macro_rules! only_called_by_foo {
              () => { unstable() } // warning
          }
      
          foo!(unstable()) // warning
      
      The unstable inside `foo` is fine, due to the attribute. But the
      `unstable` inside `only_called_by_foo` is not, since that macro doesn't
      have the attribute, and the `unstable` passed into `foo` is also not
      fine since it isn't contained in the macro itself (that is, even though
      it is only used directly in the macro).
      
      In the process this makes the stability tracking much more precise,
      e.g. previously `println!("{}", unstable())` got no warning, but now it
      does. As such, this is a bug fix that may cause [breaking-change]s.
      
      The attribute is definitely feature gated, since it explicitly allows
      side-stepping the feature gating system.
      84b060ce
  3. 04 3月, 2015 1 次提交
  4. 03 3月, 2015 1 次提交
    • H
      Feature gate `#[static_assert]`. · c195783c
      Huon Wilson 提交于
      The API this exposes is a little strange (being attached to `static`s),
      so it makes sense to conservatively feature gate it. If it is highly
      popular, it is possible to reverse this gating.
      c195783c
  5. 01 3月, 2015 1 次提交
  6. 28 2月, 2015 1 次提交
  7. 26 2月, 2015 2 次提交
  8. 25 2月, 2015 1 次提交
  9. 23 2月, 2015 2 次提交
  10. 22 2月, 2015 1 次提交
  11. 19 2月, 2015 1 次提交
  12. 18 2月, 2015 2 次提交
  13. 17 2月, 2015 2 次提交
  14. 16 2月, 2015 1 次提交
  15. 14 2月, 2015 3 次提交
  16. 13 2月, 2015 2 次提交
  17. 12 2月, 2015 3 次提交
  18. 11 2月, 2015 1 次提交
  19. 10 2月, 2015 2 次提交
    • S
      Remove bottom from the reference · b42c559e
      Steve Klabnik 提交于
      Fixes #20172
      b42c559e
    • K
      Use a crate attribute to load plugins · 93b642d9
      Keegan McAllister 提交于
          #[plugin] #[no_link] extern crate bleh;
      
      becomes a crate attribute
      
          #![plugin(bleh)]
      
      The feature gate is still required.
      
      It's almost never correct to link a plugin into the resulting library /
      executable, because it will bring all of libsyntax and librustc with it.
      However if you really want this behavior, you can get it with a separate
      `extern crate` item in addition to the `plugin` attribute.
      
      Fixes #21043.
      Fixes #20769.
      
      [breaking-change]
      93b642d9
  20. 09 2月, 2015 1 次提交
  21. 08 2月, 2015 2 次提交
  22. 04 2月, 2015 3 次提交
  23. 03 2月, 2015 1 次提交
  24. 01 2月, 2015 3 次提交
  25. 31 1月, 2015 1 次提交