1. 30 7月, 2023 15 次提交
    • B
      Auto merge of #112280 - zica87:master, r=workingjubilee · 2e0136a1
      bors 提交于
      Remove redundant example of `BTreeSet::iter`
      
      The usage and that `Values returned by the iterator are returned in ascending order` are already demonstrated by the other example and the description, so I removed the useless one.
      2e0136a1
    • B
      Auto merge of #114226 - matthiaskrgr:rollup-wxdudsm, r=matthiaskrgr · fb53384c
      bors 提交于
      Rollup of 3 pull requests
      
      Successful merges:
      
       - #114129 (Rustdoc small cleanups)
       - #114152 ([rustc][data_structures] Simplify binary_search_slice.)
       - #114222 (Mark `lazy_type_alias` as incomplete)
      
      r? `@ghost`
      `@rustbot` modify labels: rollup
      fb53384c
    • M
      Rollup merge of #114222 - compiler-errors:lazy-type-alias-is-incomplete, r=oli-obk · d4926b13
      Matthias Krüger 提交于
      Mark `lazy_type_alias` as incomplete
      
      This feature is very not complete: https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Aopen+label%3AF-lazy_type_alias
      
      r? types
      d4926b13
    • M
      Rollup merge of #114152 - ttsugriy:master, r=WaffleLapkin · b8895980
      Matthias Krüger 提交于
      [rustc][data_structures] Simplify binary_search_slice.
      
      Instead of using `binary_search_by_key`, it's possible to use `partition_point` to find the lower bound. This avoids the need to locate the leftmost matching entry separately.
      
      It's also possible to use `partition_point` to find the upper bound, so I plan to send a separate PR for your consideration.
      b8895980
    • M
      Rollup merge of #114129 - GuillaumeGomez:rustdoc-cleanup, r=notriddle · fa94851b
      Matthias Krüger 提交于
      Rustdoc small cleanups
      
      Each commit does some little cleanups:
      
       * We had some `Res` comparisons in multiple places (and still do, but unless we use a macro, it's not possible to "merge" any further) so I moved it into a function.
       * It was weird to have some utils function used everywhere in `visit_ast` so I instead moved it into `clean/utils.rs`.
       * In HTML rendering, we had some write "issues":
         * Multiple calls that could be merged into one.
         * Some `write!` that could be `write_str`.
         * We didn't use the new `format!` args much.
      
      r? `@notriddle`
      fa94851b
    • B
      Auto merge of #113704 - compiler-errors:rpitit-assumed-wf-inherit, r=spastorino · b969b830
      bors 提交于
      Make RPITITs inherit the `assumed_wf_types` of their parent method
      
      ... and then move the RPITIT well-formedness check to just use the regular logic of wfchecking an associated type.
      
      ---
      
      We need to inherit the `assumed_wf_types` of the RPITIT's parent function in order for the given code to be considered well-formed:
      
      ```rust
      trait Foo {
        fn bar<'a, T>(_: &'a T) -> impl Iterator<Output = &'a T>;
      }
      ```
      
      Since for `&'a T` to be WF, we need `T: 'a`.
      
      In order for this to work for late-bound lifetimes, we need to do some additional mapping of any late-bound lifetimes captured by these assumed wf types. This is because within the body of the function (and thus in the `assumed_wf_types`), they're represented as `ReFree` variants of the original late-bound lifetimes declared in the function's generics, but in the RPITIT's GAT, they're represented as "reified" `ReEarlyBound` vars (duplicated during opaque type lowering). Luckily, the mapping between these two is already [stored in the opaque](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/hir/struct.OpaqueTy.html#structfield.lifetime_mapping).
      
      Fixes #113796
      b969b830
    • M
      some nits, bless test · 744e7709
      Michael Goulet 提交于
      744e7709
    • M
      50d21091
    • M
      349a2372
    • B
      Auto merge of #114211 - RalfJung:miri, r=RalfJung · 32303b21
      bors 提交于
      update Miri
      
      r? `@ghost`
      32303b21
    • M
      Mark lazy_type_alias as incomplete · 4b58ae0b
      Michael Goulet 提交于
      4b58ae0b
    • B
      Auto merge of #114156 - calebzulawski:simd-bswap, r=compiler-errors · 03a57254
      bors 提交于
      Add simd_bswap, simd_bitreverse, simd_ctlz, and simd_cttz intrinsics
      
      cc `@workingjubilee`
      03a57254
    • B
      Auto merge of #2993 - Vanille-N:tb-protector, r=RalfJung · 70757fbd
      bors 提交于
      TB: Redefine trigger condition for protectors
      
      The Coq formalization revealed that as currently implemented, read accesses did not always commute.
      Indeed starting from a lazily initialized `Active` protected tag, applying a foreign read then a child read produces `Frozen`, but child read then foreign read triggers UB (because the child read initializes _before_ the `Active -> Frozen`).
      
      This reformulation of when protectors trigger fixes that issue:
      - instead of `Active + foreign read -> Frozen` and `Active -> Frozen` when protected is UB
      - we do `Active + foreign read -> if protected { Disabled } else { Frozen }`
      
      There is already precedent for transitions being dependent on the presence of a protector (`Reserved + foreign read -> if protected { Frozen } else { Reserved }`), and this has the nice side-effect of simplifying the protector trigger condition to just an equality check against `Disabled` since now there is protector UB iff a protected tag becomes `Disabled`.
      
      In order not to introduce an extra `if`, it was decided that `Disabled -> Disabled` would be UB when protected, which was not the case previously. This is merely a theoretical for now because a protected `Disabled` is unreachable in the first place.
      
      The extra test is not directly related to this modification, but also checks things related to protectors and lazy initialization.
      70757fbd
    • B
      Auto merge of #114028 - Centri3:ternary-operator, r=compiler-errors · a04e649c
      bors 提交于
      Gracefully handle ternary operator
      
      Fixes #112578
      
      ~~May not be the best way to do this as it doesn't check for a single `:`, so it could perhaps appear even when the actual issue is just a missing semicolon. May not be the biggest deal, though?~~
      
      Nevermind, got it working properly now ^^
      a04e649c
    • N
      doc comment suggestions · 53f0cb4b
      Neven Villani 提交于
      53f0cb4b
  2. 29 7月, 2023 25 次提交