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 26 pull requests #57542

Merged
merged 73 commits into from
Jan 12, 2019
Merged

Rollup of 26 pull requests #57542

merged 73 commits into from
Jan 12, 2019

Commits on Dec 2, 2018

  1. Redo the docs for Vec::set_len

    Inspired by the recent conversation on IRLO.
    scottmcm committed Dec 2, 2018
    Configuration menu
    Copy the full SHA
    5c11392 View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2018

  1. Configuration menu
    Copy the full SHA
    ac642ab View commit details
    Browse the repository at this point in the history

Commits on Dec 21, 2018

  1. Sidestep ICE in FieldPlacement::count by not calling it when count …

    …will not fit in host's usize.
    pnkfelix committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    0eacf2c View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2019

  1. Update src/liballoc/vec.rs

    Add @Centril's comment
    
    Co-Authored-By: scottmcm <[email protected]>
    Centril and scottmcm authored Jan 3, 2019
    Configuration menu
    Copy the full SHA
    61fb909 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    40658fd View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2019

  1. Use CMAKE_{C,CXX}_COMPILER_LAUNCHER for ccache

    CMake 3.4 and newer which is the required minimum version for LLVM
    supports CMAKE_{C,CXX}_COMPILER_LAUNCHER for settting the compiler
    launcher such as ccache which doesn't require shifting arguments.
    petrhosek committed Jan 6, 2019
    Configuration menu
    Copy the full SHA
    42e65c1 View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2019

  1. Source Serif Pro regular and bold 2.007, and italic 1.007

    Use fonts from the Roman 2.007 and Italic 1.007 version at:
    https://github.com/adobe-fonts/source-serif-pro/releases/tag/2.007R-ro%2F1.007R-it
    
    The following files are used from the distribution:
    
      * WOFF/TTF/SourceSerifPro-Regular.ttf.woff
      * WOFF/TTF/SourceSerifPro-Bold.ttf.woff
      * WOFF/TTF/SourceSerifPro-It.ttf.woff
    
    These replace the older Source Serif Pro regular and bold fonts, and
    the Heuristica italic font.
    tspiteri committed Jan 7, 2019
    Configuration menu
    Copy the full SHA
    239ac2b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aa257ec View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d2ac094 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    dac6eec View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2019

  1. Configuration menu
    Copy the full SHA
    68b8b43 View commit details
    Browse the repository at this point in the history
  2. Remove CrateNum::Invalid.

    It's unused.
    nnethercote committed Jan 8, 2019
    Configuration menu
    Copy the full SHA
    8780ebf View commit details
    Browse the repository at this point in the history
  3. Supporting backtrace for x86_64-fortanix-unknown-sgx.

    Vardhan Thigle committed Jan 8, 2019
    Configuration menu
    Copy the full SHA
    4166a4e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    564a24c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d1b65fb View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ac4a454 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2019

  1. Issue 56905

    Adding a map to TypeckTables to get the list of all the Upvars
    given a closureID. This is help us get rid of the recurring
    pattern in the codebase of iterating over the free vars
    using with_freevars.
    blitzerr committed Jan 9, 2019
    Configuration menu
    Copy the full SHA
    47db51e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    410b529 View commit details
    Browse the repository at this point in the history
  3. Some more refactoring.

    Change the key of UpvarListMap from DefId to ast::NodeId
    blitzerr committed Jan 9, 2019
    Configuration menu
    Copy the full SHA
    7853b78 View commit details
    Browse the repository at this point in the history
  4. [Cleanup] This is the first in the series of removals of with_freevar…

    …s usage.
    
    Currently, there are many places in rustc, where we use
    with_freevars to iterate over freevars of a closure. The
    problem with this is the argument to with_freevars is a
    NodeId and this will get in the way of our eventual goal
    of solving for issue (rust-lang#53488), sub-issue (rust-lang#56905)
    blitzerr committed Jan 9, 2019
    Configuration menu
    Copy the full SHA
    15d8e8f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5052197 View commit details
    Browse the repository at this point in the history
  6. addressing Niko's comments

    blitzerr committed Jan 9, 2019
    Configuration menu
    Copy the full SHA
    69e4918 View commit details
    Browse the repository at this point in the history
  7. Merge pull request rust-lang#1 from Centril/redo-vec-set_len-docs-adjust

    Explain safety for `vec.set_len(0)`
    scottmcm authored Jan 9, 2019
    Configuration menu
    Copy the full SHA
    986e49d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a89cece View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4b4fc63 View commit details
    Browse the repository at this point in the history
  10. Clarify const_let comment

    oli-obk committed Jan 9, 2019
    Configuration menu
    Copy the full SHA
    a49acea View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    aef6288 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    80262e6 View commit details
    Browse the repository at this point in the history
  13. Remove outdated comment

    king6cong committed Jan 9, 2019
    Configuration menu
    Copy the full SHA
    0e56e13 View commit details
    Browse the repository at this point in the history
  14. Exposing enclave image-base to the enclave application

    image-base could be used by crates like backtrace to providing to make
    symbol resolution easier.
    Vardhan Thigle committed Jan 9, 2019
    Configuration menu
    Copy the full SHA
    2e4766c View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    4a454d6 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2019

  1. Configuration menu
    Copy the full SHA
    29a8386 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f282f6b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    beb6495 View commit details
    Browse the repository at this point in the history
  4. Update src/libstd/path.rs

    Co-Authored-By: steveklabnik <[email protected]>
    Centril and steveklabnik authored Jan 10, 2019
    Configuration menu
    Copy the full SHA
    e598ea8 View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2019

  1. Remove submodule step from README

    Since the bootstrap does it now
    nrc authored Jan 11, 2019
    Configuration menu
    Copy the full SHA
    27989ec View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4103e5b View commit details
    Browse the repository at this point in the history
  3. Fix undefined behavior

    Jethro Beekman committed Jan 11, 2019
    Configuration menu
    Copy the full SHA
    928efca View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    16a4e47 View commit details
    Browse the repository at this point in the history
  5. Correct RELEASES.md for 1.32.0

    The `into_to_from_bytes` feature was stabilized for `i128` and `u128` just like for the other integer types, but they seem to have been missed.
    pthariensflame authored Jan 11, 2019
    Configuration menu
    Copy the full SHA
    434fe4e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    020e1f5 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    fdd2f0d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    49e8318 View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2019

  1. Stabilise irrefutable if-let and while-let patterns

    This stabilises RFC 2086 (rust-lang#44495).
    
    Co-Authored-By: Sebastian Malton <[email protected]>
    varkor and Nokel81 committed Jan 12, 2019
    Configuration menu
    Copy the full SHA
    afcb938 View commit details
    Browse the repository at this point in the history
  2. bless ui/while-let

    Centril committed Jan 12, 2019
    Configuration menu
    Copy the full SHA
    0e1402d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3dc08ed View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6c62322 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#56425 - scottmcm:redo-vec-set_len-docs, r=C…

    …entril
    
    Redo the docs for Vec::set_len
    
    Inspired by the [recent conversation on IRLO](https://internals.rust-lang.org/t/make-vec-set-len-enforce-the-len-cap-invariant/8927/23?u=scottmcm).
    
    This is just my first stab at this; suggestions welcome.
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    e69a5cb View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#56906 - blitzerr:master, r=nikomatsakis

    Issue rust-lang#56905
    
    Adding a map to TypeckTables to get the list of all the Upvars
    given a closureID. This is help us get rid of the recurring
    pattern in the codebase of iterating over the free vars
    using with_freevars.
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    53aa8a1 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#57042 - pnkfelix:issue-57038-sidestep-ice-i…

    …n-fieldplacement-count, r=michaelwoerister
    
    Don't call `FieldPlacement::count` when count is too large
    
    Sidestep ICE in `FieldPlacement::count` by not calling it when count will not fit in host's usize.
    
    (I briefly played with trying to fix this by changing `FieldPlacement::count` to return a `u64`. However, based on how `FieldPlacement` is used, it seems like this would be a largely pointless pursuit... I'm open to counter-arguments, however.)
    
    Fix rust-lang#57038
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    017f046 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#57175 - oli-obk:const_let_stabilization, r=…

    …nikomatsakis
    
    Stabilize `let` bindings and destructuring in constants and const fn
    
    r? @Centril
    
    This PR stabilizes the following features in constants and `const` functions:
    
    * irrefutable destructuring patterns (e.g. `const fn foo((x, y): (u8, u8)) { ... }`)
    * `let` bindings (e.g. `let x = 1;`)
    * mutable `let` bindings (e.g. `let mut x = 1;`)
    * assignment (e.g. `x = y`) and assignment operator (e.g. `x += y`) expressions, even where the assignment target is a projection (e.g. a struct field or index operation like `x[3] = 42`)
    * expression statements (e.g. `3;`)
    
    This PR does explicitly *not* stabilize:
    
    * mutable references (i.e. `&mut T`)
    * dereferencing mutable references
    * refutable patterns (e.g. `Some(x)`)
    * operations on `UnsafeCell` types (as that would need raw pointers and mutable references and such, not because it is explicitly forbidden. We can't explicitly forbid it as such values are OK as long as they aren't mutated.)
    * We are not stabilizing `let` bindings in constants that use `&&` and `||` short circuiting operations. These are treated as `&` and `|` inside `const` and `static` items right now. If we stopped treating them as `&` and `|` after stabilizing `let` bindings, we'd break code like `let mut x = false; false && { x = true; false };`. So to use `let` bindings in constants you need to change `&&` and `||` to `&` and `|` respectively.
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    bd8f464 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#57192 - czipperz:error_trait_doc_cause_to_s…

    …ource, r=wesleywiser
    
    Change std::error::Error trait documentation to talk about `source` instead of `cause`
    
    Resolves rust-lang#57056
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    40a819b View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#57296 - JosephTLyons:Fix-question-mark-oper…

    …ator-in-stdio-document, r=wesleywiser
    
    Fixed the link to the ? operator
    
    I'm working on updating all broken links, but figured I'd break up the pull requests so they are easier to review, versus just one big pull request.
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    ebbecac View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#57368 - petrhosek:cmake-compiler-launcher, …

    …r=alexcrichton
    
    Use CMAKE_{C,CXX}_COMPILER_LAUNCHER for ccache
    
    CMake 3.4 and newer which is the required minimum version for LLVM
    supports CMAKE_{C,CXX}_COMPILER_LAUNCHER for settting the compiler
    launcher such as ccache which doesn't require shifting arguments.
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    c6146b2 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#57400 - tspiteri:source-serif-pro-it, r=Gui…

    …llaumeGomez
    
    Rustdoc: update Source Serif Pro and replace Heuristica italic
    
    When Source Serif Pro was used to replace Heuristica in rust-lang#15530, the italic variant was not ready yet, but now it is. This PR updates the Source Serif Pro font files to the [latest release](https://github.com/adobe-fonts/source-serif-pro/releases/tag/2.007R-ro%2F1.007R-it) which includes an italic variant, and replaces Heuristica italic with Source Serif Pro italic.
    
    Fixes rust-lang#57363.
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    7be2ff3 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#57417 - QuietMisdreavus:semi-revert-doctest…

    …-parsing, r=GuillaumeGomez
    
    rustdoc: use text-based doctest parsing if a macro is wrapping main
    
    This is a "forward-port" of rust-lang#57019, intended to get rust-lang#56898 on nightly, since it's now fixed on beta (and already worked on stable).
    
    To recap:
    
    * The libsyntax-based doctest parsing now checks to see whether there is a top-level macro invocation in the doctest while it's checking for `fn main` and an `extern crate` statement.
    * If it finds a macro invocation and *didn't* find `fn main`, then it performs the older text-based scan to allow doctests like the ones in `allocator_api` to still compile.
    
    A "proper" fix will involve changing how `make_test` works to call it later in the `run_test` function, after the initial steps of compilation have completed. I've filed [a separate issue](rust-lang#57415) for that, though.
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    a61ebac View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#57433 - ecstatic-morse:issue-56610-bad-link…

    …, r=dtolnay
    
    Add link destination for `read-ownership`
    
    Resolves rust-lang#56610.
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    a9c9a2c View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#57434 - nnethercote:rm-CrateNum-Invalid, r=…

    …petrochenkov
    
    Remove `CrateNum::Invalid`.
    
    It's unused.
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    632d890 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#57441 - VardhanThigle:Vardhan/x86_64-fortan…

    …ix-unknown-sgx-backtrace-support, r=alexcrichton
    
    Supporting backtrace for x86_64-fortanix-unknown-sgx.
    
    # Overview
    Implementing following functions required by `libstd/sys_common` to support `backtrace`:
    ```
    1. unwind_backtrace
    2. trace_fn
    3. resolve_symname
    ```
    # Description:
    The changes here are quite similar to the Cloudabi target `src/libstd/sys/cloudabi/backtrace.rs`
    The first 2 functions are implemented via calls to libunwind.a that is linked to the `x86_64-fortanix-unknown-sgx` (rust-lang#56979),  we have not implemented functionality needed by `resolve_symname`  (or `dladdr`) to reduce SGX TCB. Rather, we print the function address (relative to enclave image base) in `resolve_symname` which can be later translated to correct symbol name (say, via `addr2line`).
    
    # Note:
    For `x86_64-fortanix-unknown-sgx`, the `RUST_BACKTRACE` environment has to be set from within the program running in an enclave.
    cc: @jethrogb
    r? @alexcrichton
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    85a7fc8 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#57450 - steveklabnik:gh45678, r=KodrAus

    actually take a slice in this example
    
    Fixes rust-lang#45678
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    0b1427e View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#57459 - varkor:E0202-issue-reference, r=pet…

    …rochenkov
    
    Reference tracking issue for inherent associated types in diagnostic
    
    This makes it clearer that associated types in inherent impls are an intended feature, like the diagnostic for equality constraints in where clauses. (This is more helpful, because the lack of associated types is a confusing omission and it lets users more easily track the state of the feature.)
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    f7da074 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#57463 - phansch:fix_some_links, r=steveklabnik

    docs: Fix some 'second-edition' links
    
    If I understand it correctly, we now want to link to
    
        https://doc.rust-lang.org/book/*.html
    
    instead of
    
        https://doc.rust-lang.org/book/second-edition/*.html
    
    because the second-edition page says that it's no longer distributed with
    Rust's docs.
    
    For example: https://doc.rust-lang.org/book/second-edition/ch13-01-closures.html
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    e7dc880 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    1fff64a View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#57493 - euclio:deref-suggest, r=oli-obk

    use structured suggestion when casting a reference
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    e0cea0d View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#57498 - steveklabnik:gh29008, r=alexcrichton

    make note of one more normalization that Paths do
    
    Fixes rust-lang#29008
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    cbe377b View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#57499 - steveklabnik:gh47757, r=Mark-Simula…

    …crum
    
    note that FromStr does not work for borrowed types
    
    Fixes rust-lang#47757
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    dc6d86b View commit details
    Browse the repository at this point in the history
  24. Rollup merge of rust-lang#57505 - rust-lang:nrc-patch-1, r=alexcrichton

    Remove submodule step from README
    
    Since the bootstrap does it now
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    52e02fc View commit details
    Browse the repository at this point in the history
  25. Rollup merge of rust-lang#57510 - nrc:manifest-profiles, r=alexcrichton

    Add a profiles section to the manifest
    
    This supports the profiles work for Rustup in a backwards compatible manner.
    
    r? @alexcrichton
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    1f66062 View commit details
    Browse the repository at this point in the history
  26. Rollup merge of rust-lang#57511 - jethrogb:jb/fix-undef, r=cramertj

    Fix undefined behavior
    
    From the [`MaybeUninit::get_mut` docs](https://doc.rust-lang.org/std/mem/union.MaybeUninit.html):
    > It is up to the caller to guarantee that the the MaybeUninit really is in an initialized state, otherwise this will immediately cause undefined behavior.
    
    r? @joshtriplett
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    bcbf73f View commit details
    Browse the repository at this point in the history
  27. Rollup merge of rust-lang#57519 - pthariensflame:patch-2, r=alexcrichton

    Correct RELEASES.md for 1.32.0
    
    The `into_to_from_bytes` feature was stabilized for `i128` and `u128` just like for the other integer types, but they seem to have been missed.
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    7da604e View commit details
    Browse the repository at this point in the history
  28. Rollup merge of rust-lang#57522 - euclio:format-ice, r=varkor

    don't unwrap unexpected tokens in `format!`
    
    Fixes rust-lang#57512.
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    e234d15 View commit details
    Browse the repository at this point in the history
  29. Rollup merge of rust-lang#57530 - insideoutclub:master, r=estebank

    Fixing a typographical error.
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    0a8b5b4 View commit details
    Browse the repository at this point in the history
  30. Rollup merge of rust-lang#57535 - varkor:stabilise-if-while-let-patte…

    …rns, r=Centril
    
    Stabilise irrefutable if-let and while-let patterns
    
    This stabilises RFC 2086 (rust-lang#44495).
    
    This replaces rust-lang#55639, as we want to stabilise this in time for the beta cut-off.
    
    Closes rust-lang#55639.
    
    r? @Centril
    Centril authored Jan 12, 2019
    Configuration menu
    Copy the full SHA
    3117784 View commit details
    Browse the repository at this point in the history