1. 19 12月, 2021 16 次提交
    • M
      Rollup merge of #91984 - Aaron1011:rustc-middle-lifetime, r=oli-obk · 4d5ffc48
      Matthias Krüger 提交于
      Remove `in_band_lifetimes` from `rustc_middle`
      
      See #91867
      
      This was mostly straightforward. In several places, I take advantage
      of the fact that lifetimes are non-hygenic: a macro declares the
      'tcx' lifetime, which is then used in types passed in as macro
      arguments.
      4d5ffc48
    • M
      Rollup merge of #91141 - jhpratt:int_roundings, r=joshtriplett · 6d268952
      Matthias Krüger 提交于
      Revert "Temporarily rename int_roundings functions to avoid conflicts"
      
      This reverts commit 3ece63b6.
      
      This should be okay because #90329 has been merged.
      
      r? `@joshtriplett`
      6d268952
    • B
      Auto merge of #91871 - camelid:urlpartsbuilder, r=GuillaumeGomez · 8f540619
      bors 提交于
      rustdoc: Add `UrlPartsBuilder`
      
      This is a type for efficiently and easily constructing the part of a URL
      after the domain: `nightly/core/str/struct.Bytes.html`.
      
      It allows simplifying some code and avoiding some allocations in the
      `href_*` functions.
      
      It will also allow making `Cache.paths` et al. use `Symbol` without
      having to allocate `String`s in the `href_*` functions. `String`s would
      be necessary otherwise because `Symbol::as_str()` returns `SymbolStr`,
      whose `Deref<Target = str>` impl requires the `str` to not outlive it.
      This is the primary motivation for the addition of `UrlPartsBuilder`.
      8f540619
    • B
      Auto merge of #89831 - Aaron1011:project-caching-speedup, r=jackh726 · d6cffe41
      bors 提交于
      Re-introduce concept of projection cache 'completion'
      
      Instead of clearing out the cache entirely, we store
      the intermediate evaluation result into the cache entry.
      This accomplishes several things:
      
      * We avoid the performance hit associated with re-evaluating
        the sub-obligations
      * We avoid causing issues with incremental compilation, since
        the final evaluation result is always the same
      * We avoid affecting other uses of the same `InferCtxt` which
        might care about 'side effects' from processing the sub-obligations
        (e,g. region constraints). Only code that is specifically aware
         of the new 'complete' code is affected
      d6cffe41
    • B
      Auto merge of #92090 - matthiaskrgr:rollup-pbyqddi, r=matthiaskrgr · df2f45c1
      bors 提交于
      Rollup of 7 pull requests
      
      Successful merges:
      
       - #91834 (Update browser-ui-test version and improve rustdoc-gui tests readability)
       - #91894 (Remove `in_band_lifetimes` from `rustc_incremental`)
       - #91932 (Add user seed to `-Z randomize-layout`)
       - #91956 (fix(rustc_lint): better detect when parens are necessary)
       - #92020 (Remove P: Unpin bound on impl Stream for Pin)
       - #92063 (docs: fix typo)
       - #92082 (rustdoc: Write doc-comments directly instead of using FromIterator)
      
      Failed merges:
      
      r? `@ghost`
      `@rustbot` modify labels: rollup
      df2f45c1
    • A
      Re-introduce concept of projection cache 'completion' · 40ef1d32
      Aaron Hill 提交于
      Instead of clearing out the cache entirely, we store
      the intermediate evaluation result into the cache entry.
      This accomplishes several things:
      
      * We avoid the performance hit associated with re-evaluating
        the sub-obligations
      * We avoid causing issues with incremental compilation, since
        the final evaluation result is always the same
      * We avoid affecting other uses of the same `InferCtxt` which
        might care about 'side effects' from processing the sub-obligations
        (e,g. region constraints). Only code that is specifically aware
         of the new 'complete' code is affected
      40ef1d32
    • M
      Rollup merge of #92082 - jyn514:remove-from-iterator, r=jyn514 · d486e68a
      Matthias Krüger 提交于
      rustdoc: Write doc-comments directly instead of using FromIterator
      
      The FromIterator impl made the code much harder to understand. The types
      don't make sense until you realize there's a custom FromIterator impl.
      
      This is the first commit from https://github.com/rust-lang/rust/pull/91305; since ``@camelid`` wrote it originally I don't feel bad unilaterally approving it.
      
      r? ``@ghost``
      ``@bors`` r+
      
      Note that this will conflict with https://github.com/rust-lang/rust/pull/92078.
      d486e68a
    • M
      Rollup merge of #92063 - OverOrion:patch-1, r=jyn514 · 74c3ce92
      Matthias Krüger 提交于
      docs: fix typo
      
      Add missing `'s` to ` Let check it out.`
      74c3ce92
    • M
      Rollup merge of #92020 - Folyd:stream-unpin, r=m-ou-se · e22aae00
      Matthias Krüger 提交于
      Remove P: Unpin bound on impl Stream for Pin
      
      Similar to https://github.com/rust-lang/rust/pull/81363.
      e22aae00
    • M
      Rollup merge of #91956 - notriddle:notriddle/unused-parens-range, r=nagisa · 48915315
      Matthias Krüger 提交于
      fix(rustc_lint): better detect when parens are necessary
      
      Fixes #90807
      48915315
    • M
      Rollup merge of #91932 - Kixiron:randomize-seed, r=nagisa · 6b62bf38
      Matthias Krüger 提交于
      Add user seed to `-Z randomize-layout`
      
      Allows users of -`Z randomize-layout` to provide `-Z layout-seed=<seed>` in order to further randomizing type layout randomization. Extension of [compiler-team/#457](https://github.com/rust-lang/compiler-team/issues/457), allows users to change struct layouts without changing code and hoping that item path hashes change, aiding in detecting layout errors
      6b62bf38
    • M
      Rollup merge of #91894 - pitaj:91867-incremental, r=Aaron1011 · 80390871
      Matthias Krüger 提交于
      Remove `in_band_lifetimes` from `rustc_incremental`
      
      #91867
      80390871
    • M
      Rollup merge of #91834 - GuillaumeGomez:improve-gui-test-readability, r=jsha · 3f4013d4
      Matthias Krüger 提交于
      Update browser-ui-test version and improve rustdoc-gui tests readability
      
      Since the `0.5.1`, we can use trailing commas. I also used the opportunity to clean up the existing tests.
      
      r? `@notriddle`
      3f4013d4
    • B
      Auto merge of #91837 - Kobzol:stable-hash-map-avoid-sort, r=the8472 · daf2204a
      bors 提交于
      Avoid sorting in hash map stable hashing
      
      Suggested by `@the8472` [here](https://github.com/rust-lang/rust/pull/89404#issuecomment-991813333). I hope that I understood it right, I replaced the sort with modular multiplication, which should be commutative.
      
      Can I ask for a perf. run? However, locally it didn't help at all. Creating the `StableHasher` all over again is probably slowing it down quite a lot. And using `FxHasher` is not straightforward, because the keys and values only implement `HashStable` (and probably they shouldn't be just hashed via `Hash` anyway for it to actually be stable).
      
      Maybe the `StableHash` interface could be changed somehow to better suppor these scenarios where the hasher is short-lived. Or the `StableHasher` implementation could have variants with e.g. a shorter buffer for these scenarios.
      daf2204a
    • B
      Auto merge of #92065 - matthiaskrgr:rollup-qmpcsuj, r=matthiaskrgr · 91a0600a
      bors 提交于
      Rollup of 7 pull requests
      
      Successful merges:
      
       - #91566 (Apply path remapping to DW_AT_GNU_dwo_name when producing split DWARF)
       - #91926 (Remove `in_band_lifetimes` from `rustc_metadata`)
       - #91931 (Remove `in_band_lifetimes` from `rustc_codegen_llvm`)
       - #92024 (rustc_codegen_llvm: Give each codegen unit a unique DWARF name on all platforms, not just Apple ones.)
       - #92037 (Use a const ParamEnv when in default_method_body_is_const)
       - #92047 (Set `RUST_BACKTRACE=0` when running location-detail tests)
       - #92050 (Add a space and 2 grave accents )
      
      Failed merges:
      
      r? `@ghost`
      `@rustbot` modify labels: rollup
      91a0600a
    • N
      Write code directly instead of using FromIterator · 7f383c3a
      Noah Lev 提交于
      The FromIterator impl made the code much harder to understand. The types
      don't make sense until you realize there's a custom FromIterator impl.
      7f383c3a
  2. 18 12月, 2021 24 次提交