1. 05 7月, 2019 1 次提交
  2. 04 7月, 2019 20 次提交
    • B
      Auto merge of #62355 - Centril:rollup-xnxtcgm, r=Centril · b43eb423
      bors 提交于
      Rollup of 16 pull requests
      
      Successful merges:
      
       - #62039 (Remove needless lifetimes (rustc))
       - #62173 (rename InterpretCx -> InterpCx)
       - #62240 (wfcheck: resolve the type-vars in `AdtField` types)
       - #62249 (Use mem::take instead of mem::replace with default)
       - #62252 (Update mem::replace example to not be identical to mem::take)
       - #62258 (syntax: Unsupport `foo! bar { ... }` macros in the parser)
       - #62268 (Clean up inherent_impls)
       - #62287 (Use link attributes on extern "C" blocks with llvm-libuwind)
       - #62295 (miri realloc: do not require giving old size+align)
       - #62297 (refactor check_for_substitution)
       - #62316 (When possible without changing semantics, implement Iterator::last in terms of DoubleEndedIterator::next_back for types in liballoc and libcore.)
       - #62317 (Migrate `compile-pass` annotations to `build-pass`)
       - #62337 (Fix bucket in CPU usage script)
       - #62344 (simplify Option::get_or_insert)
       - #62346 (enable a few more tests in Miri and update the comment for others)
       - #62351 (remove bogus example from drop_in_place)
      
      Failed merges:
      
      r? @ghost
      b43eb423
    • M
      Rollup merge of #62351 - RalfJung:drop-in-place, r=cramertj · 6363a58e
      Mazdak Farrokhzad 提交于
      remove bogus example from drop_in_place
      
      Fixes https://github.com/rust-lang/rust/issues/62313
      6363a58e
    • M
      Rollup merge of #62346 - RalfJung:miri-tests, r=Centril · 144ed029
      Mazdak Farrokhzad 提交于
      enable a few more tests in Miri and update the comment for others
      144ed029
    • M
      Rollup merge of #62344 - matklad:simplify-option, r=sfackler · 839e89c3
      Mazdak Farrokhzad 提交于
      simplify Option::get_or_insert
      
      I am pretty sure that the optimized result will be the same, and it's one `unsafe` less in the stdlib!
      839e89c3
    • M
      Rollup merge of #62337 - Mark-Simulacrum:fix-cpu-usage-script, r=alexcrichton · cd1fa004
      Mazdak Farrokhzad 提交于
      Fix bucket in CPU usage script
      
      r? @alexcrichton
      cd1fa004
    • M
      Rollup merge of #62317 - JohnTitor:move-tests-to-build-pass, r=Centril · 91934970
      Mazdak Farrokhzad 提交于
      Migrate `compile-pass` annotations to `build-pass`
      
      This is a part of #62277.
      
      As a first step, the `compile-pass` tests are migrated to `build-pass`.
      
      r? @cramertj
      cc @Centril
      91934970
    • M
      Rollup merge of #62316 - khuey:efficient_last, r=sfackler · 4049a3cf
      Mazdak Farrokhzad 提交于
      When possible without changing semantics, implement Iterator::last in terms of DoubleEndedIterator::next_back for types in liballoc and libcore.
      
      Provided that the iterator has finite length and does not trigger user-provided code, this is safe.
      
      What follows is a full list of the DoubleEndedIterators in liballoc/libcore and whether this optimization is safe, and if not, why not.
      
      src/liballoc/boxed.rs
      Box: Pass through to avoid defeating optimization of the underlying DoubleIterator implementation. This has no correctness impact.
      
      src/liballoc/collections/binary_heap.rs
      Iter: Pass through to avoid defeating optimizations on slice::Iter
      IntoIter: Not safe, changes Drop order
      Drain: Not safe, changes Drop order
      
      src/liballoc/collections/btree/map.rs
      Iter: Safe to call next_back, invokes no user defined code.
      IterMut: ditto
      IntoIter: Not safe, changes Drop order
      Keys: Safe to call next_back, invokes no user defined code.
      Values: ditto
      ValuesMut: ditto
      Range: ditto
      RangeMut: ditto
      
      src/liballoc/collections/btree/set.rs
      Iter: Safe to call next_back, invokes no user defined code.
      IntoIter: Not safe, changes Drop order
      Range: Safe to call next_back, invokes no user defined code.
      
      src/liballoc/collections/linked_list.rs
      Iter: Safe to call next_back, invokes no user defined code.
      IterMut: ditto
      IntoIter: Not safe, changes Drop order
      
      src/liballoc/collections/vec_deque.rs
      Iter: Safe to call next_back, invokes no user defined code.
      IterMut: ditto
      IntoIter: Not safe, changes Drop order
      Drain: ditto
      
      src/liballoc/string.rs
      Drain: Safe because return type is a primitive (char)
      
      src/liballoc/vec.rs
      IntoIter: Not safe, changes Drop order
      Drain: ditto
      Splice: ditto
      
      src/libcore/ascii.rs
      EscapeDefault: Safe because return type is a primitive (u8)
      
      src/libcore/iter/adapters/chain.rs
      Chain: Not safe, invokes user defined code (Iterator impl)
      
      src/libcore/iter/adapters/flatten.rs
      FlatMap: Not safe, invokes user defined code (Iterator impl)
      Flatten: ditto
      FlattenCompat: ditto
      
      src/libcore/iter/adapters/mod.rs
      Rev: Not safe, invokes user defined code (Iterator impl)
      Copied: ditto
      Cloned: Not safe, invokes user defined code (Iterator impl and T::clone)
      Map: Not safe, invokes user defined code (Iterator impl + closure)
      Filter: ditto
      FilterMap: ditto
      Enumerate: Not safe, invokes user defined code (Iterator impl)
      Skip: ditto
      Fuse: ditto
      Inspect: ditto
      
      src/libcore/iter/adapters/zip.rs
      Zip: Not safe, invokes user defined code (Iterator impl)
      
      src/libcore/iter/range.rs
      ops::Range: Not safe, changes Drop order, but ALREADY HAS SPECIALIZATION
      ops::RangeInclusive: ditto
      
      src/libcore/iter/sources.rs
      Repeat: Not safe, calling last should iloop.
      Empty: No point, iterator is at most one item long.
      Once: ditto
      OnceWith: ditto
      
      src/libcore/option.rs
      Item: No point, iterator is at most one item long.
      Iter: ditto
      IterMut: ditto
      IntoIter: ditto
      
      src/libcore/result.rs
      Iter: No point, iterator is at most one item long
      IterMut: ditto
      IntoIter: ditto
      
      src/libcore/slice/mod.rs
      Split: Not safe, invokes user defined closure
      SplitMut: ditto
      RSplit: ditto
      RSplitMut: ditto
      Windows: Safe, already has specialization
      Chunks: ditto
      ChunksMut: ditto
      ChunksExact: ditto
      ChunksExactMut: ditto
      RChunks: ditto
      RChunksMut: ditto
      RChunksExact: ditto
      RChunksExactMut: ditto
      
      src/libcore/str/mod.rs
      Chars: Safe, already has specialization
      CharIndices: ditto
      Bytes: ditto
      Lines: Safe to call next_back, invokes no user defined code.
      LinesAny: Deprecated
      Everything that is generic over P: Pattern: Not safe because Pattern invokes user defined code.
      SplitWhitespace: Safe to call next_back, invokes no user defined code.
      SplitAsciiWhitespace: ditto
      
      This is attempt 2 of #60130.
      
      r? @sfackler
      4049a3cf
    • M
      Rollup merge of #62297 - matklad:peek-delimited, r=petrochenkov · c0ec5672
      Mazdak Farrokhzad 提交于
      refactor check_for_substitution
      
      No behavior change, just flatter and simpler code.
      
      r? @petrochenkov
      c0ec5672
    • M
      Rollup merge of #62295 - RalfJung:miri-realloc, r=cramertj · 44f22e69
      Mazdak Farrokhzad 提交于
      miri realloc: do not require giving old size+align
      44f22e69
    • M
      Rollup merge of #62287 - petrhosek:libunwind-link-attribute, r=tmandry · d93b52fd
      Mazdak Farrokhzad 提交于
      Use link attributes on extern "C" blocks with llvm-libuwind
      
      When llvm-libunwind feature is enabled, we need to use link attribute on
      extern "C" blocks to make sure that symbols provided by LLVM's libunwind
      that's built as part of Rust's libunwind crate are re-exported.
      
      This addresses issue #62088.
      d93b52fd
    • M
      Rollup merge of #62268 - Zoxc:inherent_impls, r=eddyb · d7e42cc6
      Mazdak Farrokhzad 提交于
      Clean up inherent_impls
      
      Split out from https://github.com/rust-lang/rust/pull/61923.
      
      r? @EddyB
      d7e42cc6
    • M
      Rollup merge of #62258 - petrochenkov:idclean, r=Centril · 8867ba19
      Mazdak Farrokhzad 提交于
      syntax: Unsupport `foo! bar { ... }` macros in the parser
      
      Their support in expansion was removed in https://github.com/rust-lang/rust/pull/61606.
      
      Also un-reserve `macro_rules` as a macro name, there's no ambiguity between `macro_rules` definitions and macro calls (it also wasn't reserved correctly).
      
      cc https://github.com/rust-lang-nursery/wg-grammar/issues/51
      8867ba19
    • M
      Rollup merge of #62252 - czipperz:change-mem-replace-doc-example, r=dtolnay · 944bda9a
      Mazdak Farrokhzad 提交于
      Update mem::replace example to not be identical to mem::take
      
      This also adds assertions that the operations work as expected.
      944bda9a
    • M
      Rollup merge of #62249 - czipperz:use-mem-take-instead-of-replace-default, r=dtolnay,Centril · 88c007cd
      Mazdak Farrokhzad 提交于
      Use mem::take instead of mem::replace with default
      88c007cd
    • M
      Rollup merge of #62240 - arielb1:resolve-wf-fields, r=pnkfelix · 6cfd474e
      Mazdak Farrokhzad 提交于
      wfcheck: resolve the type-vars in `AdtField` types
      
      Normalization can leave some type-vars unresolved in its return type.
      Make sure to resolve them so we have an infcx-independent type that can
      be used with `needs_drop`.
      
      Fixes #61402.
      
      Closes #62212 - this PR fixes the root cause.
      6cfd474e
    • M
      Rollup merge of #62173 - RalfJung:miri-interp, r=oli-obk · 740d5bd1
      Mazdak Farrokhzad 提交于
      rename InterpretCx -> InterpCx
      
      That's more consistent with InterpResult and InterpError.
      
      r? @oli-obk
      740d5bd1
    • M
      Rollup merge of #62039 - jeremystucki:needless_lifetimes, r=eddyb · e8a88f7d
      Mazdak Farrokhzad 提交于
      Remove needless lifetimes (rustc)
      e8a88f7d
    • R
      remove bogus example from drop_in_place · 6225607e
      Ralf Jung 提交于
      6225607e
    • R
      4dd5edc7
    • A
      simplify Option::get_or_insert · c51802ac
      Aleksey Kladov 提交于
      c51802ac
  3. 03 7月, 2019 19 次提交