1. 08 3月, 2022 9 次提交
  2. 07 3月, 2022 9 次提交
    • G
      Update minifier version · a496fa4f
      Guillaume Gomez 提交于
      a496fa4f
    • G
    • G
      Remove unneeded whitespace generation and use CSS instead instead to align... · e89efb86
      Guillaume Gomez 提交于
      Remove unneeded whitespace generation and use CSS instead instead to align line numbers to the right
      e89efb86
    • L
      add tests for #94502 · dad81b65
      lcnr 提交于
      dad81b65
    • N
      Clarify `Layout` interning. · 4f008e06
      Nicholas Nethercote 提交于
      `Layout` is another type that is sometimes interned, sometimes not, and
      we always use references to refer to it so we can't take any advantage
      of the uniqueness properties for hashing or equality checks.
      
      This commit renames `Layout` as `LayoutS`, and then introduces a new
      `Layout` that is a newtype around an `Interned<LayoutS>`. It also
      interns more layouts than before. Previously layouts within layouts
      (via the `variants` field) were never interned, but now they are. Hence
      the lifetime on the new `Layout` type.
      
      Unlike other interned types, these ones are in `rustc_target` instead of
      `rustc_middle`. This reflects the existing structure of the code, which
      does layout-specific stuff in `rustc_target` while `TyAndLayout` is
      generic over the `Ty`, allowing the type-specific stuff to occur in
      `rustc_middle`.
      
      The commit also adds a `HashStable` impl for `Interned`, which was
      needed. It hashes the contents, unlike the `Hash` impl which hashes the
      pointer.
      4f008e06
    • M
      5ddaa2d5
    • M
      890a44f6
    • N
      Introduce `ConstAllocation`. · 48522914
      Nicholas Nethercote 提交于
      Currently some `Allocation`s are interned, some are not, and it's very
      hard to tell at a use point which is which.
      
      This commit introduces `ConstAllocation` for the known-interned ones,
      which makes the division much clearer. `ConstAllocation::inner()` is
      used to get the underlying `Allocation`.
      
      In some places it's natural to use an `Allocation`, in some it's natural
      to use a `ConstAllocation`, and in some places there's no clear choice.
      I've tried to make things look as nice as possible, while generally
      favouring `ConstAllocation`, which is the type that embodies more
      information. This does require quite a few calls to `inner()`.
      
      The commit also tweaks how `PartialOrd` works for `Interned`. The
      previous code was too clever by half, building on `T: Ord` to make the
      code shorter. That caused problems with deriving `PartialOrd` and `Ord`
      for `ConstAllocation`, so I changed it to build on `T: PartialOrd`,
      which is slightly more verbose but much more standard and avoided the
      problems.
      48522914
    • T
      remove unnecessary `..` patterns · 51a53bf4
      Takayuki Maeda 提交于
      51a53bf4
  3. 06 3月, 2022 7 次提交
  4. 05 3月, 2022 15 次提交