1. 01 3月, 2022 10 次提交
    • L
      rust-analyzer · 276d5fef
      Laurențiu Nicola 提交于
      276d5fef
    • B
      Auto merge of #94299 - oli-obk:stable_hash_ty, r=michaelwoerister · 8d6f5275
      bors 提交于
      Caching the stable hash of Ty within itself
      
      Instead of computing stable hashes on types as needed, we compute it during interning.
      
      This way we can, when a hash is requested, just hash that hash, which is significantly faster than traversing the type itself.
      
      We only do this for incremental for now, as incremental is the only frequent user of stable hashing.
      
      As a next step we can try out
      
      * moving the hash and TypeFlags to Interner, so projections and regions get the same benefit (tho regions are not nested, so maybe that's not a good idea? Would be nice for dedup tho)
      * start comparing types via their stable hash instead of their address?
      8d6f5275
    • B
      Auto merge of #94453 - matthiaskrgr:rollup-xv9y98j, r=matthiaskrgr · 4ce37492
      bors 提交于
      Rollup of 6 pull requests
      
      Successful merges:
      
       - #92399 (fix typo in btree/vec doc: Self -> self)
       - #92823 (Tweak diagnostics)
       - #94248 (Fix ICE when passing block to while-loop condition)
       - #94414 (Fix ICE when using Box<T, A> with large A)
       - #94445 (4 - Make more use of `let_chains`)
       - #94449 (Add long explanation for E0726)
      
      Failed merges:
      
      r? `@ghost`
      `@rustbot` modify labels: rollup
      4ce37492
    • M
      Rollup merge of #94449 - GuillaumeGomez:explanation-e0726, r=Urgau · 34657ccb
      Matthias Krüger 提交于
      Add long explanation for E0726
      
      This is the cleaned up version of #87655 with the missing fixes.
      
      Part of https://github.com/rust-lang/rust/issues/61137.
      
      r? `@Urgau`
      34657ccb
    • M
      Rollup merge of #94445 - c410-f3r:more-let-chains, r=cjgillot · 5be38d2b
      Matthias Krüger 提交于
      4 - Make more use of `let_chains`
      
      Continuation of #94376.
      
      cc #53667
      5be38d2b
    • M
      Rollup merge of #94414 - DrMeepster:box_alloc_ice2, r=tmiasko · 975a0e01
      Matthias Krüger 提交于
      Fix ICE when using Box<T, A> with large A
      
      A sequel to #94043 that fixes #81270 and #92054 (duplicate).
      975a0e01
    • M
      Rollup merge of #94248 - compiler-errors:fix-while-loop-bad-delay, r=petrochenkov · 93407918
      Matthias Krüger 提交于
      Fix ICE when passing block to while-loop condition
      
      We were incorrectly delaying a bug when we passed _any_ block (that evaluated to `()`) to a while loop. This PR makes the check a bit more sophisticated.
      
      We should only suppress the error here in cases that are equivalent to those we find in #93574 (i.e. only while loop conditions that have destructuring assignment expressions in them).
      
      Fixes #93997
      cc `@estebank` who added this code
      
      I would not be opposed to removing the delay-bug altogether, and just emitting this error always. I much prefer duplicate errors over no errors.
      93407918
    • M
      Rollup merge of #92823 - estebank:tweak-diag, r=jackh726 · a040e2f4
      Matthias Krüger 提交于
      Tweak diagnostics
      
      * Recover from invalid `'label: ` before block.
      * Make suggestion to enclose statements in a block multipart.
      * Point at `match`, `while`, `loop` and `unsafe` keywords when failing
        to parse their expression. (Fix #92705.)
      * Do not suggest `{ ; }`.
      * Do not suggest `|` when very unlikely to be what was wanted (in `let`
        statements).
      a040e2f4
    • M
      Rollup merge of #92399 - Veeupup:fix_vec_typo, r=Dylan-DPC · 9d23c320
      Matthias Krüger 提交于
      fix typo in btree/vec doc: Self -> self
      
      this pr fixes #92345
      the documentation refers to the object the method is called for, not the type, so it should be using the lower case self.
      9d23c320
    • E
      Tweak diagnostics · f42b4f59
      Esteban Kuber 提交于
      * Recover from invalid `'label: ` before block.
      * Make suggestion to enclose statements in a block multipart.
      * Point at `match`, `while`, `loop` and `unsafe` keywords when failing
        to parse their expression.
      * Do not suggest `{ ; }`.
      * Do not suggest `|` when very unlikely to be what was wanted (in `let`
        statements).
      f42b4f59
  2. 28 2月, 2022 30 次提交