1. 26 8月, 2021 2 次提交
  2. 25 8月, 2021 9 次提交
    • B
      Auto merge of #87937 - LeSeulArtichaut:active-if-let-guards, r=nagisa · a992a119
      bors 提交于
      Don't mark `if_let_guard` as an incomplete feature
      
      I don't think there is any reason for `if_let_guard` to be an incomplete feature, and I think the reason they were marked in the first place was simply because they weren't implemented at all.
      
      r? `@pnkfelix`
      cc tracking issue #51114
      a992a119
    • B
      Auto merge of #85344 - cbeuw:remap-across-cwd, r=michaelwoerister · 958d788a
      bors 提交于
      Correctly handle remapping from path containing the current directory with trailing paths
      
      If we have a `auxiliary/lib.rs`, and we generate the metadata with `--remap-path-prefix $PWD/auxiliary=xyz`, the path to `$PWD/auxiliary/lib.rs` won't be correctly remapped in the metadata. This is because internally, path to the working directory itself and relative paths to files under the working directory are remapped separately (hence neither are affected since neither has `$PWD/auxiliary` as prefix), but the concatenation between the working directory and the relative path is not remapped. This PR fixes that.
      958d788a
    • B
      Auto merge of #87875 - asquared31415:generic-lang-items, r=cjgillot · 9863bf51
      bors 提交于
      Improve detection of generics on lang items
      
      Adds detection for the required generics for all lang items.  Many lang items require an exact or minimum amount of generic arguments and if they don't exist, the compiler will ICE.  This does not add any additional validation about bounds on generics or any other lang item restrictions.
      
      Fixes one of the ICEs in #87573
      
      cc `@FabianWolff`
      9863bf51
    • B
      Auto merge of #84333 - tmiasko:liveness-yield, r=tmandry · 1a9ac38d
      bors 提交于
      Improve liveness analysis for generators
      
      Liveness analysis for generators assumes that execution always continues
      normally after a yield point, not accounting for the fact that generator
      could be dropped before completion.
      
      If generators captures any variables by reference, those variables could
      be used within a generator, or when the generator completes, but also
      after each yield point in the case the generator is dropped.
      
      Account for the case when generator is dropped after yielding, but
      before running to the completion. This effectively considers all
      variables captured by reference to be used after a yield point.
      
      Fixes #84292.
      1a9ac38d
    • B
      Auto merge of #88242 - bonega:allocation_range, r=oli-obk · e5484cec
      bors 提交于
      Use custom wrap-around type instead of RangeInclusive
      
      Two reasons:
      
      1. More memory is allocated than necessary for `valid_range` in `Scalar`. The range is not used as an iterator and `exhausted` is never used.
      2. `contains`, `count` etc. methods in `RangeInclusive` are doing very unhelpful(and dangerous!) things when used as a wrap-around range. - In general this PR wants to limit potentially confusing methods, that have a low probability of working.
      
      Doing a local perf run, every metric shows improvement except for instructions.
      Max-rss seem to have a very consistent improvement.
      
      Sorry - newbie here, probably doing something wrong.
      e5484cec
    • B
      Auto merge of #88271 - sexxi-goose:liveness, r=nikomatsakis · faa0a104
      bors 提交于
      2229: Consider varaiables mentioned in closure as used
      
      Fixes: https://github.com/rust-lang/project-rfc-2229/issues/57
      
      r? `@nikomatsakis`
      faa0a104
    • B
      Auto merge of #88266 - nikomatsakis:issue-87879, r=jackh726 · b03ccace
      bors 提交于
      resolve type variables after checking casts
      
      r? `@jackh726`
      
      Fixes #87814
      Fixes #88118
      
      Supercedes #87879 (cc `@ldm0)`
      b03ccace
    • A
      use convention for with_* methods · f17e384a
      Andreas Liljeqvist 提交于
      f17e384a
    • B
      Auto merge of #87472 - inquisitivecrystal:stabilize-force-warn, r=Mark-Simulacrum · 0599f340
      bors 提交于
      Stabilize and document `--force-warn`
      
      This PR will stabilize and document the `--force-warn` command line option. It is currently a draft, pending an FCP.
      
      I've taken the liberty of tidying up the lint level command line options a bit as part of this. The changes are quite minor and should only affect rustc's help output. I'm making them here because they're trivial and, in one case, necessary to unify the way `--force-warn` with the way the other options are displayed.
      
      I also want to mention that `@rylev` has done a ton of work on moving this along and deserves most of the credit. I'm just the one who landed up writing this particular PR.
      
      Resolves #86516.
      0599f340
  3. 24 8月, 2021 29 次提交