1. 01 9月, 2021 16 次提交
    • M
      Rollup merge of #88548 - inquisitivecrystal:intersperse, r=m-ou-se · f436b6d0
      Mara Bos 提交于
      Stabilize `Iterator::intersperse()`
      
      This PR stabilizes the methods `Iterator::intersperse()` and `Iterator::intersperse_with()`. The FCP has [already completed](https://github.com/rust-lang/rust/issues/79524#issuecomment-909663616).
      
      Closes #79524.
      f436b6d0
    • M
      Rollup merge of #88542 - tavianator:readdir_r-errno, r=jyn514 · 59588a9a
      Mara Bos 提交于
      Use the return value of readdir_r() instead of errno
      
      POSIX says:
      
      > If successful, the readdir_r() function shall return zero; otherwise,
      > an error number shall be returned to indicate the error.
      
      But we were previously using errno instead of the return value.  This
      led to issue #86649.
      59588a9a
    • M
      Rollup merge of #88525 - notriddle:notriddle/coherence-dyn-auto-trait, r=petrochenkov · bbc94ed3
      Mara Bos 提交于
      fix(rustc_typeck): produce better errors for dyn auto trait
      
      Fixes #85026
      bbc94ed3
    • M
      Rollup merge of #88410 - camelid:fix-assoc-bold, r=GuillaumeGomez · 75b2ae5e
      Mara Bos 提交于
      Remove bolding on associated constants
      
      Associated types don't get bolded, so it looks off to have one kind
      bolded and one not.
      75b2ae5e
    • M
      Rollup merge of #88350 - programmerjake:add-ppc-cr-xer-clobbers, r=Amanieu · 494c563f
      Mara Bos 提交于
      add support for clobbering xer, cr, and cr[0-7] for asm! on OpenPower/PowerPC
      
      Fixes #88315
      494c563f
    • M
      Rollup merge of #88053 - bjorn3:fix_flock_fallback_impl, r=cjgillot · 8fd53e30
      Mara Bos 提交于
      Fix the flock fallback implementation
      8fd53e30
    • M
      Rollup merge of #88040 - nbdd0121:btreemap, r=m-ou-se · 5878780e
      Mara Bos 提交于
      BTree: remove Ord bound from new
      
      `K: Ord` bound is unnecessary on `BTree{Map,Set}::new` and their `Default` impl. No elements exist so there are nothing to compare anyway, so I don't think "future proof" would be a blocker here. This is analogous to `HashMap::new` not having a `K: Eq + Hash` bound.
      
      #79245 originally does this and for some reason drops the change to `new` and `Default`. I can see why changes to other methods like `entry` or `symmetric_difference` need to be careful but I couldn't find out any reason not to do it on `new`.
      
      Removing the bound also makes the stabilisation of `const fn new` not depending on const trait bounds.
      
      cc `@steffahn` who suggests me to make this PR.
      
      r? `@dtolnay`
      5878780e
    • M
      Rollup merge of #86376 - asquared31415:extern-no-mangle-84204, r=Mark-Simulacrum · dcefd687
      Mara Bos 提交于
      Emit specific warning to clarify that `#[no_mangle]` should not be applied on foreign statics or functions
      
      Foreign statics and foreign functions should not have `#[no_mangle]` applied, as it does nothing to the name and has some extra hidden behavior that is normally unwanted.  There was an existing warning for this, but it says the attribute is only allowed on "statics or functions", which to the user can be confusing.
      
      This PR adds a specific version of the unused `#[no_mangle]` warning that explains that the target is a *foreign* static or function and that they do not need the attribute.
      
      Fixes #78989
      dcefd687
    • B
      Auto merge of #88121 - camelid:better-recursive-alias-error, r=estebank · c4f26b15
      bors 提交于
      Improve errors for recursive type aliases
      
      Fixes #17539.
      c4f26b15
    • B
      Auto merge of #87688 - camsteffen:let-else, r=cjgillot · c2a40884
      bors 提交于
      Introduce `let...else`
      
      Tracking issue: #87335
      
      The trickiest part for me was enforcing the diverging else block with clear diagnostics. Perhaps the obvious solution is to expand to `let _: ! = ..`, but I decided against this because, when a "mismatched type" error is found in typeck, there is no way to trace where in the HIR the expected type originated, AFAICT. In order to pass down this information, I believe we should introduce `Expectation::LetElseNever(HirId)` or maybe add `HirId` to `Expectation::HasType`, but I left that as a future enhancement. For now, I simply assert that the block is `!` with a custom `ObligationCauseCode`, and I think this is clear enough, at least to start. The downside here is that the error points at the entire block rather than the specific expression with the wrong type. I left a todo to this effect.
      
      Overall, I believe this PR is feature-complete with regard to the RFC.
      c2a40884
    • B
      Auto merge of #88533 - oli-obk:tait_🧊, r=spastorino · a3956106
      bors 提交于
      Concrete regions can show up in mir borrowck if the originated from there
      
      We used to not encounter them here, because we took regions from typeck's opaque type resolution by renumbering them. We don't do that anymore. Instead mir borrock does all the logic, and it can handle concrete regions just fine, as long as it created them itself.
      
      fixes #83190 which was introduced by #87287
      
      r? `@spastorino`
      a3956106
    • I
      Stabilize `Iterator::intersperse()` · 06dd4c03
      inquisitivecrystal 提交于
      06dd4c03
    • B
      Auto merge of #88506 - Mark-Simulacrum:fix-rlibs, r=ehuss · 29ef6cf1
      bors 提交于
      Fix loading large rlibs
      
      Bumps object crate to permit parsing archives with 64-bit table entries. These
      are primarily encountered when there's more than 4GB of archive data.
      
      cc https://github.com/gimli-rs/object/issues/365
      
      Helps with https://github.com/rust-lang/rust/issues/88351, but will also need a beta backport
      
      r? `@ehuss` (mostly for the test)
      29ef6cf1
    • T
      Use the return value of readdir_r() instead of errno · 0e0c8aef
      Tavian Barnes 提交于
      POSIX says:
      
      > If successful, the readdir_r() function shall return zero; otherwise,
      > an error number shall be returned to indicate the error.
      
      But we were previously using errno instead of the return value.  This
      led to issue #86649.
      0e0c8aef
    • N
      Remove bolding on associated constants · 87e39ac1
      Noah Lev 提交于
      Associated types don't get bolded, so it looks off to have one kind
      bolded and one not.
      87e39ac1
    • B
      Auto merge of #88535 - m-ou-se:rollup-jeusxbo, r=m-ou-se · 0a84708e
      bors 提交于
      Rollup of 10 pull requests
      
      Successful merges:
      
       - #85017 (Add carrying_add, borrowing_sub, widening_mul, carrying_mul methods to integers)
       - #86362 (Avoid cloning LocalDecls)
       - #88391 (Fix json tuple struct enum variant )
       - #88399 (Disallow the aapcs CC on Aarch64)
       - #88418 (Allow `~const` bounds on trait assoc functions)
       - #88445 (Clean up the lowering of AST items)
       - #88495 (Add `TcpStream::set_linger` and `TcpStream::linger`)
       - #88501 (Use right span in prelude collision suggestions with macros. )
       - #88504 (Keep turbofish in prelude collision lint.)
       - #88524 (Remove unnecessary `mut` from udp doctests)
      
      Failed merges:
      
      r? `@ghost`
      `@rustbot` modify labels: rollup
      0a84708e
  2. 31 8月, 2021 24 次提交