1. 02 4月, 2022 2 次提交
  2. 23 3月, 2022 1 次提交
  3. 16 3月, 2022 1 次提交
  4. 15 2月, 2022 1 次提交
    • N
      Overhaul `Const`. · a95fb8b1
      Nicholas Nethercote 提交于
      Specifically, rename the `Const` struct as `ConstS` and re-introduce `Const` as
      this:
      ```
      pub struct Const<'tcx>(&'tcx Interned<ConstS>);
      ```
      This now matches `Ty` and `Predicate` more closely, including using
      pointer-based `eq` and `hash`.
      
      Notable changes:
      - `mk_const` now takes a `ConstS`.
      - `Const` was copy, despite being 48 bytes. Now `ConstS` is not, so need a
        we need separate arena for it, because we can't use the `Dropless` one any
        more.
      - Many `&'tcx Const<'tcx>`/`&Const<'tcx>` to `Const<'tcx>` changes
      - Many `ct.ty` to `ct.ty()` and `ct.val` to `ct.val()` changes.
      - Lots of tedious sigil fiddling.
      a95fb8b1
  5. 25 9月, 2021 1 次提交
    • A
      Use larger span for adjustments on method calls · 4d66986e
      Aaron Hill 提交于
      Currently, we use a relatively 'small' span for THIR
      expressions generated by an 'adjustment' (e.g. an autoderef,
      autoborrow, unsizing). As a result, if a borrow generated
      by an adustment ends up causing a borrowcheck error, for example:
      
      ```rust
      let mut my_var = String::new();
      let my_ref = &my_var
      my_var.push('a');
      my_ref;
      ```
      
      then the span for the mutable borrow may end up referring
      to only the base expression (e.g. `my_var`), rather than
      the method call which triggered the mutable borrow
      (e.g. `my_var.push('a')`)
      
      Due to a quirk of the MIR borrowck implementation,
      this doesn't always get exposed in migration mode,
      but it does in many cases.
      
      This commit makes THIR building consistently use 'larger'
      spans for adjustment expressions
      
      The intent of this change it make it clearer to users
      when it's the specific way in which a variable is
      used (for example, in a method call) that produdes
      a borrowcheck error. For example, an error message
      claiming that a 'mutable borrow occurs here' might
      be confusing if it just points at a usage of a variable
      (e.g. `my_var`), when no `&mut` is in sight. Pointing
      at the entire expression should help to emphasize
      that the method call itself is responsible for
      the mutable borrow.
      
      In several cases, this makes the `#![feature(nll)]` diagnostic
      output match up exactly with the default (migration mode) output.
      As a result, several `.nll.stderr` files end up getting removed
      entirely.
      4d66986e
  6. 09 9月, 2021 2 次提交
  7. 25 7月, 2021 1 次提交
  8. 17 7月, 2021 1 次提交
    • A
      Changed dec2flt to use the Eisel-Lemire algorithm. · 8752b403
      Alex Huszagh 提交于
      Implementation is based off fast-float-rust, with a few notable changes.
      
      - Some unsafe methods have been removed.
      - Safe methods with inherently unsafe functionality have been removed.
      - All unsafe functionality is documented and provably safe.
      - Extensive documentation has been added for simpler maintenance.
      - Inline annotations on internal routines has been removed.
      - Fixed Python errors in src/etc/test-float-parse/runtests.py.
      - Updated test-float-parse to be a library, to avoid missing rand dependency.
      - Added regression tests for #31109 and #31407 in core tests.
      - Added regression tests for #31109 and #31407 in ui tests.
      - Use the existing slice primitive to simplify shared dec2flt methods
      - Remove Miri ignores from dec2flt, due to faster parsing times.
      
      - resolves #85198
      - resolves #85214
      - resolves #85234
      - fixes #31407
      - fixes #31109
      - fixes #53015
      - resolves #68396
      - closes https://github.com/aldanor/fast-float-rust/issues/15
      8752b403
  9. 22 5月, 2021 3 次提交
  10. 19 5月, 2021 1 次提交
  11. 12 3月, 2021 2 次提交
  12. 10 3月, 2021 3 次提交
  13. 18 11月, 2020 1 次提交
    • A
      Move capture lowering from THIR to MIR · 7faebe57
      Aman Arora 提交于
      This allows us to:
      - Handle precise Places captured by a closure directly in MIR. Handling
      captures in MIR is easier since we can rely on/ tweak PlaceBuilder to
      generate `mir::Place`s that resemble how we store captures (`hir::Place`).
      - Allows us to handle `let _ = x` case when feature `capture_disjoint_fields`
      is enabled directly in MIR. This is required to be done in MIR since
      patterns are desugared in MIR.
      7faebe57
  14. 30 8月, 2020 1 次提交
  15. 18 8月, 2020 1 次提交
  16. 08 8月, 2020 1 次提交
    • N
      Eliminate the `SessionGlobals` from `librustc_ast`. · e539dd65
      Nicholas Nethercote 提交于
      By moving `{known,used}_attrs` from `SessionGlobals` to `Session`. This
      means they are accessed via the `Session`, rather than via TLS. A few
      `Attr` methods and `librustc_ast` functions are now methods of
      `Session`.
      
      All of this required passing a `Session` to lots of functions that didn't
      already have one. Some of these functions also had arguments removed, because
      those arguments could be accessed directly via the `Session` argument.
      
      `contains_feature_attr()` was dead, and is removed.
      
      Some functions were moved from `librustc_ast` elsewhere because they now need
      to access `Session`, which isn't available in that crate.
      - `entry_point_type()` --> `librustc_builtin_macros`
      - `global_allocator_spans()` --> `librustc_metadata`
      - `is_proc_macro_attr()` --> `Session`
      e539dd65
  17. 01 8月, 2020 1 次提交
  18. 17 7月, 2020 1 次提交
  19. 15 7月, 2020 3 次提交
  20. 29 6月, 2020 1 次提交
  21. 24 4月, 2020 1 次提交
  22. 14 4月, 2020 1 次提交
  23. 02 4月, 2020 1 次提交
  24. 30 3月, 2020 2 次提交
  25. 14 3月, 2020 1 次提交
  26. 01 3月, 2020 1 次提交
  27. 21 2月, 2020 1 次提交
  28. 20 2月, 2020 1 次提交
  29. 16 2月, 2020 1 次提交
  30. 14 1月, 2020 1 次提交