1. 01 1月, 2021 2 次提交
  2. 30 12月, 2020 2 次提交
  3. 27 12月, 2020 1 次提交
  4. 22 12月, 2020 2 次提交
  5. 18 12月, 2020 2 次提交
    • A
      Stop using intermediate macros in definition of symbols · 2b2462e8
      Arlie Davis 提交于
      Currently, the rustc_macros::symbols macro generates two
      `macro_rules!` macros as its output. These two macros are
      used in rustc_span/src/symbol.rs.
      
      This means that each Symbol that we define is represented
      in the AST of rustc_symbols twice: once in the definition
      of the `define_symbols!` macro (similarly for the
      `keywords! macro), and once in the rustc_span::symbols
      definition.
      
      That would be OK if there were only a handful of symbols,
      but currently we define over 1100 symbols. The definition
      of the `define_symbols!` macro contains the expanded definition
      of each symbol, so that's a lot of AST storage wasted on a
      macro that is used exactly once.
      
      This commit removes the `define_symbols` macro, and simply
      allows the proc macro to directly generate the
      `rustc_symbols::symbol::sym` module.
      
      The benefit is mainly in reducing memory wasted during
      compilation of rustc itself. It should also reduce memory used
      by Rust Analyzer.
      
      This commit also reduces the size of the AST for symbol
      definitions, by moving two `#[allow(...)]` attributes from
      the symbol constants to the `sym` module. This eliminates 2200+
      attribute nodes.
      
      This commit also eliminates the need for the `digits_array`
      constant. There's no need to store an array of Symbol values
      for digits. We can simply define a constant of the base value,
      and add to that base value.
      2b2462e8
    • P
      docs: Edit rustc_span::symbol::Symbol method · 54cce72d
      pierwill 提交于
      Edit wording of the doc comment for rustc_span::symbol::Symbol::can_be_raw
      to match related methods.
      54cce72d
  6. 15 12月, 2020 1 次提交
    • J
      Switch to Symbol for item.name · a16904fe
      Joshua Nelson 提交于
      This decreases the size of `Item` from 680 to 616 bytes. It also does a
      lot less work since it no longer has to copy as much.
      a16904fe
  7. 11 12月, 2020 1 次提交
  8. 10 12月, 2020 1 次提交
  9. 04 12月, 2020 1 次提交
  10. 01 12月, 2020 1 次提交
  11. 28 11月, 2020 1 次提交
  12. 24 11月, 2020 1 次提交
  13. 11 11月, 2020 1 次提交
  14. 09 11月, 2020 1 次提交
  15. 07 11月, 2020 1 次提交
  16. 28 10月, 2020 1 次提交
  17. 27 10月, 2020 3 次提交
  18. 26 10月, 2020 1 次提交
  19. 23 10月, 2020 1 次提交
  20. 22 10月, 2020 1 次提交
    • F
      add rustc_allow_const_fn_unstable attribute · 3948b054
      Florian Warzecha 提交于
      allow_internal_unstable is currently used
      to side-step feature gate and stability checks.
      While it was originally only meant to be used
      only on macros, its use was expanded to
      const functions.
      
      This commit prepares stricter checks for the usage of allow_internal_unstable (only on macros)
      and introduces the rustc_allow_const_fn_unstable attribute for usage on functions.
      
      See rust-lang/rust#69399
      3948b054
  21. 19 10月, 2020 4 次提交
  22. 17 10月, 2020 1 次提交
  23. 12 10月, 2020 1 次提交
  24. 09 10月, 2020 1 次提交
  25. 06 10月, 2020 2 次提交
  26. 02 10月, 2020 1 次提交
  27. 30 9月, 2020 1 次提交
  28. 28 9月, 2020 2 次提交
  29. 26 9月, 2020 1 次提交