Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 17 pull requests #62354

Closed
wants to merge 49 commits into from
Closed

Commits on Jun 27, 2019

  1. rename InterpretCx -> InterpCx

    That's more consistent with InterpResult and InterpError.
    RalfJung committed Jun 27, 2019
    Configuration menu
    Copy the full SHA
    fc918a3 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2019

  1. 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 rust-lang#61402.
    arielb1 committed Jun 29, 2019
    Configuration menu
    Copy the full SHA
    a02d436 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2019

  1. Update mem::replace example to not be identical to mem::take

    This also adds assertions that the operations work as expected.
    czipperz committed Jun 30, 2019
    Configuration menu
    Copy the full SHA
    f7061db View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2019

  1. syntax: Unsupport foo! bar { ... } macros in the parser

    Unreserve `macro_rules` as a macro name
    petrochenkov committed Jul 1, 2019
    Configuration menu
    Copy the full SHA
    3f39dc1 View commit details
    Browse the repository at this point in the history
  2. Address review comments

    petrochenkov committed Jul 1, 2019
    Configuration menu
    Copy the full SHA
    d0dc41a View commit details
    Browse the repository at this point in the history
  3. Clean up inherent_impls

    Zoxc committed Jul 1, 2019
    Configuration menu
    Copy the full SHA
    8d6b1d1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b49fb76 View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2019

  1. Configuration menu
    Copy the full SHA
    8a3797b View commit details
    Browse the repository at this point in the history
  2. Convert more usages over

    czipperz committed Jul 2, 2019
    Configuration menu
    Copy the full SHA
    636f5e6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b0c199a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1443abc View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    eddfad3 View commit details
    Browse the repository at this point in the history
  6. refactor check_for_substitution

    No behavior change, just flatter and simpler code
    matklad committed Jul 2, 2019
    Configuration menu
    Copy the full SHA
    dc088b2 View commit details
    Browse the repository at this point in the history
  7. 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
    khuey committed Jul 2, 2019
    Configuration menu
    Copy the full SHA
    db16e17 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c004451 View commit details
    Browse the repository at this point in the history
  9. 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 rust-lang#62088.
    petrhosek committed Jul 2, 2019
    Configuration menu
    Copy the full SHA
    8d2f80b View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2019

  1. Configuration menu
    Copy the full SHA
    87e8613 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0477e07 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6ae80cf View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d50a3a7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ec71176 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d28832d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3cd4df7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    80f4c49 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b17cec5 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    edcde70 View commit details
    Browse the repository at this point in the history
  11. Revert changes to the standard library

    Moved to its own PR
    jeremystucki committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    88c515d View commit details
    Browse the repository at this point in the history
  12. Update the rust-installer submodule

    This pulls in a commit which uses parallel xz encoding which should
    hopefully help shave some time off the dist builders which spend an
    inordinate amount of time compressing this data.
    alexcrichton authored and Mark-Simulacrum committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    f5b2541 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    b4712f0 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    c51802a View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    4dd5edc View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    6225607 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#62039 - jeremystucki:needless_lifetimes, r=…

    …eddyb
    
    Remove needless lifetimes (rustc)
    Centril committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    4c87ba3 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#62153 - alexcrichton:parallel-compress, r=M…

    …ark-Simulacrum
    
    Update the `rust-installer` submodule
    
    This pulls in a commit which uses parallel xz encoding which should
    hopefully help shave some time off the dist builders which spend an
    inordinate amount of time compressing this data.
    Centril committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    0b8b883 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#62173 - RalfJung:miri-interp, r=oli-obk

    rename InterpretCx -> InterpCx
    
    That's more consistent with InterpResult and InterpError.
    
    r? @oli-obk
    Centril committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    b34b0f7 View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#62240 - arielb1:resolve-wf-fields, r=pnkfelix

    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 rust-lang#61402.
    
    Closes rust-lang#62212 - this PR fixes the root cause.
    Centril committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    8db468a View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#62249 - czipperz:use-mem-take-instead-of-re…

    …place-default, r=dtolnay,Centril
    
    Use mem::take instead of mem::replace with default
    Centril committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    04d811e View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#62252 - czipperz:change-mem-replace-doc-exa…

    …mple, r=dtolnay
    
    Update mem::replace example to not be identical to mem::take
    
    This also adds assertions that the operations work as expected.
    Centril committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    2ae8202 View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#62258 - petrochenkov:idclean, r=Centril

    syntax: Unsupport `foo! bar { ... }` macros in the parser
    
    Their support in expansion was removed in rust-lang#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 rust-lang/wg-grammar#51
    Centril committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    33a60f5 View commit details
    Browse the repository at this point in the history
  24. Rollup merge of rust-lang#62268 - Zoxc:inherent_impls, r=eddyb

    Clean up inherent_impls
    
    Split out from rust-lang#61923.
    
    r? @eddyb
    Centril committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    1c667cc View commit details
    Browse the repository at this point in the history
  25. Rollup merge of rust-lang#62287 - petrhosek:libunwind-link-attribute,…

    … r=tmandry
    
    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 rust-lang#62088.
    Centril committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    3bd6234 View commit details
    Browse the repository at this point in the history
  26. Rollup merge of rust-lang#62295 - RalfJung:miri-realloc, r=cramertj

    miri realloc: do not require giving old size+align
    Centril committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    a368388 View commit details
    Browse the repository at this point in the history
  27. Rollup merge of rust-lang#62297 - matklad:peek-delimited, r=petrochenkov

    refactor check_for_substitution
    
    No behavior change, just flatter and simpler code.
    
    r? @petrochenkov
    Centril committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    7e7045b View commit details
    Browse the repository at this point in the history
  28. Rollup merge of rust-lang#62316 - khuey:efficient_last, r=sfackler

    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 rust-lang#60130.
    
    r? @sfackler
    Centril committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    dfb4d77 View commit details
    Browse the repository at this point in the history
  29. Rollup merge of rust-lang#62317 - JohnTitor:move-tests-to-build-pass,…

    … r=Centril
    
    Migrate `compile-pass` annotations to `build-pass`
    
    This is a part of rust-lang#62277.
    
    As a first step, the `compile-pass` tests are migrated to `build-pass`.
    
    r? @cramertj
    cc @Centril
    Centril committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    b9d8a5b View commit details
    Browse the repository at this point in the history
  30. Rollup merge of rust-lang#62337 - Mark-Simulacrum:fix-cpu-usage-scrip…

    …t, r=alexcrichton
    
    Fix bucket in CPU usage script
    
    r? @alexcrichton
    Centril committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    ed6c9ea View commit details
    Browse the repository at this point in the history
  31. Rollup merge of rust-lang#62344 - matklad:simplify-option, r=sfackler

    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!
    Centril committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    773b1b9 View commit details
    Browse the repository at this point in the history
  32. Rollup merge of rust-lang#62346 - RalfJung:miri-tests, r=Centril

    enable a few more tests in Miri and update the comment for others
    Centril committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    be055e4 View commit details
    Browse the repository at this point in the history
  33. Rollup merge of rust-lang#62351 - RalfJung:drop-in-place, r=cramertj

    remove bogus example from drop_in_place
    
    Fixes rust-lang#62313
    Centril committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    667904f View commit details
    Browse the repository at this point in the history