1. 23 11月, 2020 12 次提交
    • M
      Rollup merge of #79295 - ssomers:btree_fix_78903, r=Mark-Simulacrum · b54838f9
      Mara Bos 提交于
      BTreeMap: fix minor testing mistakes in #78903
      
      Mostly a duplicate test case
      r? `@Mark-Simulacrum`
      b54838f9
    • M
      Rollup merge of #79293 - Havvy:test-eval-order-compound-assign, r=Mark-Simulacrum · 138845d4
      Mara Bos 提交于
      Add test for eval order for a+=b
      
      Yes, the order of evaluation *does* change depending on the types of
      the operands. Cursed, I know.
      
      I've elected to place this test into `expr/compound-assignment` creating
      both the `expr` directory and the `compound-assignment` directory. I
      plan in a future PR to also move the `if` directory and the loose `if`
      tests into `expr/if` and other similar cleanups of the `test/ui`
      directory.
      
      Future work: Test more than just `+=`, but all operators. I don't know
      if using a macro to generate these tests cases would be okay or not,
      but it'd be boilerplatey without it. I'm also confident you cannot
      change the evaluation order of one operator without changing all of
      them.
      
      Future work: Additionally, test more than just `i32 += i32` for the
      primitive version. I don't actually know the full set of primitive
      implementations, but I imagine there's enough to cause a combinatorial
      explosion with the previous future work item. Somewhere on the order of
      one to two hundred individual functions.
      138845d4
    • M
      Rollup merge of #79267 - ssomers:btree_namespaces, r=Mark-Simulacrum · 5793fa9c
      Mara Bos 提交于
      BTreeMap: address namespace conflicts
      
      Fix an annoyance popping up whenever synchronizing the test cases with a version capable of miri-track-raw-pointers.
      
      r? `@Mark-Simulacrum`
      5793fa9c
    • M
      Rollup merge of #78793 - camelid:fixup-structuraleq, r=jyn514 · 8a623e6f
      Mara Bos 提交于
      Clean up `StructuralEq` docs
      8a623e6f
    • M
      Rollup merge of #78608 - ThinkChaos:stabilize_refcell_take, r=m-ou-se · b249844c
      Mara Bos 提交于
      Stabilize refcell_take
      
      Tracking Issue: #71395
      
      ``@KodrAus`` nominated this for FCP, so here's a PR!
      I've never made a stabilization PR, so please mention if there's anything I can improve, thanks.
      b249844c
    • M
      Rollup merge of #78305 - ChrisDenton:const-layout, r=oli-obk · 186ec649
      Mara Bos 提交于
      Stabilize alloc::Layout const functions
      
      Stabilizes #67521. In particular the following stable methods are stabilized as `const fn`:
      
      * `size`
      * `align`
      * `from_size_align`
      
      Stabilizing `size` and `align` should not be controversial as they are simple (usize and NonZeroUsize) fields and I don't think there's any reason to make them not const compatible in the future. That being true, the other methods are trivially `const`. The only other issue being returning a `Result` from a `const fn` but this has been made more usable by recent stabilizations.
      186ec649
    • M
      Rollup merge of #77697 - WaffleLapkin:iter_split_adaptors, r=m-ou-se · 4407049f
      Mara Bos 提交于
      Split each iterator adapter and source into individual modules
      
      This PR creates individual modules for each iterator adapter and iterator source.
      
      This is done to enhance the readability of corresponding modules (`adapters/mod.rs` and `sources.rs`) which were hard to navigate and read because of lots of repeated lines (e.g.: `adapters/mod.rs` was 3k lines long). This is also in line with some adapters which already had their own modules (`Flatten`, `FlatMap`, `Chain`, `Zip`, `Fuse`).
      
      This PR also makes `Take`s adapter fields private (I have no idea why they were `pub(super)` before).
      
      r? ``@LukasKalbertodt``
      4407049f
    • M
      Rollup merge of #76941 - clarfonthey:is_subnormal, r=m-ou-se · 9b98f1d2
      Mara Bos 提交于
      Add f{32,64}::is_subnormal
      
      The docs recommend that you use dedicated methods instead of calling `classify` directly, although there isn't actually a way of checking if a number is subnormal without calling classify. There are dedicated methods for all other forms, excluding `is_zero` (which is just `== 0.0` anyway).
      9b98f1d2
    • C
      Stabilize `alloc::Layout const` functions · 9050d127
      Chris Denton 提交于
      Stabilizes #67521. In particular the following stable methods are stabilized as const fn:
      
      * size
      * align
      * from_size_align
      9050d127
    • L
      Add f{32,64}::is_subnormal · cf26f2f0
      ltdk 提交于
      cf26f2f0
    • T
      Stabilize refcell_take · 5c6689ba
      ThinkChaos 提交于
      5c6689ba
    • B
      Auto merge of #79243 - Nadrieril:consolidate-tests, r=varkor · c643dd2e
      bors 提交于
      Consolidate exhaustiveness-related tests
      
      I hunted for tests that only exercised the match exhaustiveness algorithm and regrouped them. I also improved integer-range tests since I had found them lacking while hacking around.
      The interest is mainly so that one can pass `--test-args patterns` and catch most relevant tests.
      
      r? `@varkor`
      `@rustbot` modify labels: +A-exhaustiveness-checking
      c643dd2e
  2. 22 11月, 2020 28 次提交