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 11 pull requests #59538

Closed
wants to merge 40 commits into from
Closed

Rollup of 11 pull requests #59538

wants to merge 40 commits into from

Commits on Mar 26, 2019

  1. Fix stack overflow when generating debuginfo for 'recursive' type

    By using 'impl trait', it's possible to create a self-referential
    type as follows:
    
    fn foo() -> impl Copy { foo }
    
    This is a function which returns itself.
    Normally, the signature of this function would be impossible
    to write - it would look like 'fn foo() -> fn() -> fn() ...'
    e.g. a function which returns a function, which returns a function...
    
    Using 'impl trait' allows us to avoid writing this infinitely long
    type. While it's useless for practical purposes, it does compile and run
    
    However, issues arise when we try to generate llvm debuginfo for such a
    type. All 'impl trait' types (e.g. ty::Opaque) are resolved when we
    generate debuginfo, which can lead to us recursing back to the original
    'fn' type when we try to process its return type.
    
    To resolve this, I've modified debuginfo generation to account for these
    kinds of weird types. Unfortunately, there's no 'correct' debuginfo that
    we can generate - 'impl trait' does not exist in debuginfo, and this
    kind of recursive type is impossible to directly represent.
    
    To ensure that we emit *something*, this commit emits dummy
    debuginfo/type names whenever it encounters a self-reference. In
    practice, this should never happen - it's just to ensure that we can
    emit some kind of debuginfo, even if it's not particularly meaningful
    
    Fixes rust-lang#58463
    Aaron1011 committed Mar 26, 2019
    Configuration menu
    Copy the full SHA
    8b37e80 View commit details
    Browse the repository at this point in the history
  2. Fix inverted panic check

    Aaron1011 committed Mar 26, 2019
    Configuration menu
    Copy the full SHA
    c1b9632 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2019

  1. Add codegen test

    Aaron1011 committed Mar 27, 2019
    Configuration menu
    Copy the full SHA
    93813cf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4187560 View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2019

  1. Configuration menu
    Copy the full SHA
    4e7ec07 View commit details
    Browse the repository at this point in the history
  2. Expand test

    estebank committed Mar 28, 2019
    Configuration menu
    Copy the full SHA
    a51ca02 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e3918cf View commit details
    Browse the repository at this point in the history
  4. Fix typos

    Aaron1011 committed Mar 28, 2019
    Configuration menu
    Copy the full SHA
    50ab958 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8fd3be5 View commit details
    Browse the repository at this point in the history
  6. Implement #[non_exhaustive] on variants.

    This commit removes the check that disallows the `#[non_exhaustive]`
    attribute from being placed on enum variants and removes the associated
    tests.
    
    Further, this commit lowers the visibility of enum variant constructors
    when the variant is marked as non-exhaustive.
    davidtwco committed Mar 28, 2019
    Configuration menu
    Copy the full SHA
    3a88cd7 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2019

  1. fix text after rebase

    estebank committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    b7dc8e7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9ea6790 View commit details
    Browse the repository at this point in the history
  3. review comments

    estebank committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    07857f7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e995fa8 View commit details
    Browse the repository at this point in the history
  5. Update documentation.

    This commit updates the unstable book and diagnostics to reflect that
    the `#[non_exhaustive]` attribute is now available for enum variants.
    davidtwco committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    1893841 View commit details
    Browse the repository at this point in the history
  6. Support non-exhaustive enum variants in rustdoc.

    This commit adds support for non-exhaustive enum variants in rustdoc,
    extending the existing support for non-exhaustive enums and structs.
    davidtwco committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    49a6da2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ff33b27 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3592079 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0b96697 View commit details
    Browse the repository at this point in the history
  10. Whitelist rustc_layout_scalar_valid_range_{start,end} so incr comp do…

    …es not flag them as unused.
    pnkfelix committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    7642f10 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    cbbd4d5 View commit details
    Browse the repository at this point in the history
  12. Edited the dbg! docs stating that dbg! works the same way in release …

    …builds.
    Christian committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    f10e444 View commit details
    Browse the repository at this point in the history
  13. Adjusted the indentation.

    Christian committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    9240092 View commit details
    Browse the repository at this point in the history
  14. Update src/libstd/macros.rs

    Wrapped lines earlier such that it is more coherent with the rest of the text.
    
    Co-Authored-By: DevQps <[email protected]>
    Centril and DevQps authored Mar 29, 2019
    Configuration menu
    Copy the full SHA
    fe210d0 View commit details
    Browse the repository at this point in the history
  15. Update src/libstd/macros.rs

    Removed duplicate line.
    
    Co-Authored-By: DevQps <[email protected]>
    Centril and DevQps authored Mar 29, 2019
    Configuration menu
    Copy the full SHA
    8705de4 View commit details
    Browse the repository at this point in the history
  16. Fix incorrect code

    estebank committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    ddfa47f View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    9e4ec7a View commit details
    Browse the repository at this point in the history
  18. In doc examples, don't ignore read/write results

    Calling `Read::read` or `Write::write` without checking the returned
    `usize` value is almost always an error.  Example code in the
    documentation should demonstrate how to use the return value correctly.
    Otherwise, people might copy the example code thinking that it is okay
    to "fire and forget" these methods.
    mbrubeck committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    b6fb3e3 View commit details
    Browse the repository at this point in the history
  19. Fix OnceWith docstring.

    This was incorrectly copypasta'd from RepeatWith.
    goffrie authored Mar 29, 2019
    Configuration menu
    Copy the full SHA
    7ce0b67 View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#59376 - davidtwco:finally-rfc-2008-variants…

    …, r=petrochenkov,QuietMisdreavus
    
    RFC 2008: Enum Variants
    
    Part of rust-lang#44109. See [Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/rfc-2008/near/132663140) for previous discussion.
    
    r? @petrochenkov
    cc @nikomatsakis
    Centril authored Mar 29, 2019
    Configuration menu
    Copy the full SHA
    a7ae8b2 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#59446 - Aaron1011:fix/debuginfo-overflow, r…

    …=oli-obk
    
    Fix stack overflow when generating debuginfo for 'recursive' type
    
    By using 'impl trait', it's possible to create a self-referential
    type as follows:
    
    fn foo() -> impl Copy { foo }
    
    This is a function which returns itself.
    Normally, the signature of this function would be impossible
    to write - it would look like 'fn foo() -> fn() -> fn() ...'
    e.g. a function which returns a function, which returns a function...
    
    Using 'impl trait' allows us to avoid writing this infinitely long
    type. While it's useless for practical purposes, it does compile and run
    
    However, issues arise when we try to generate llvm debuginfo for such a
    type. All 'impl trait' types (e.g. ty::Opaque) are resolved when we
    generate debuginfo, which can lead to us recursing back to the original
    'fn' type when we try to process its return type.
    
    To resolve this, I've modified debuginfo generation to account for these
    kinds of weird types. Unfortunately, there's no 'correct' debuginfo that
    we can generate - 'impl trait' does not exist in debuginfo, and this
    kind of recursive type is impossible to directly represent.
    
    To ensure that we emit *something*, this commit emits dummy
    debuginfo/type names whenever it encounters a self-reference. In
    practice, this should never happen - it's just to ensure that we can
    emit some kind of debuginfo, even if it's not particularly meaningful
    
    Fixes rust-lang#58463
    Centril authored Mar 29, 2019
    Configuration menu
    Copy the full SHA
    76de89e View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#59453 - estebank:recover-tuple-parse, r=pet…

    …rochenkov
    
    Recover from parse error in tuple syntax
    Centril authored Mar 29, 2019
    Configuration menu
    Copy the full SHA
    c07b227 View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#59455 - estebank:borrow-sugg-shorthand-fiel…

    …d, r=davidtwco
    
    Account for short-hand field syntax when suggesting borrow
    
    Fix rust-lang#52965.
    Centril authored Mar 29, 2019
    Configuration menu
    Copy the full SHA
    22c267d View commit details
    Browse the repository at this point in the history
  24. Rollup merge of rust-lang#59499 - pietroalbini:fix-arm-broken-link, r…

    …=alexcrichton
    
    Fix broken download link in the armhf-gnu image
    
    Thanks to @johnterickson for pointing this out!
    
    r? @alexcrichton
    Centril authored Mar 29, 2019
    Configuration menu
    Copy the full SHA
    771502e View commit details
    Browse the repository at this point in the history
  25. Rollup merge of rust-lang#59512 - euclio:stdio-locks, r=sfackler

    implement `AsRawFd` for stdio locks
    
    cc rust-lang/rfcs#2074.
    Centril authored Mar 29, 2019
    Configuration menu
    Copy the full SHA
    e4a9b80 View commit details
    Browse the repository at this point in the history
  26. Rollup merge of rust-lang#59525 - pnkfelix:whitelist-some-rustc-attrs…

    …, r=petrochenkov
    
    Whitelist some rustc attrs
    
    These rustc attrs are used within libcore, and were causing failures when one mixed incremental compilation with bootstrapping (due to a default of `-D warnings` when bootstrapping).
    
    Fix rust-lang#59523
    Fix rust-lang#59524
    
    Cc rust-lang#58633
    Centril authored Mar 29, 2019
    Configuration menu
    Copy the full SHA
    4ce217b View commit details
    Browse the repository at this point in the history
  27. Rollup merge of rust-lang#59528 - DevQps:improve-dbg-macro-docs, r=Ce…

    …ntril
    
    Improve the dbg! macro docs
    
    # Description
    
    As stated has been discussed in rust-lang#58383 the docs do not clearly state why it is useful to have the option to use `dbg!` in release builds as well. This PR should change that.
    
    closes rust-lang#58383
    Centril authored Mar 29, 2019
    Configuration menu
    Copy the full SHA
    abd3db9 View commit details
    Browse the repository at this point in the history
  28. Rollup merge of rust-lang#59532 - mbrubeck:docs, r=Centril

    In doc examples, don't ignore read/write results
    
    Calling `Read::read` or `Write::write` without checking the returned `usize` value is almost always an error.  Example code in the documentation should demonstrate how to use the return value correctly.  Otherwise, people might copy the example code thinking that it is okay to "fire and forget" these methods.
    Centril authored Mar 29, 2019
    Configuration menu
    Copy the full SHA
    5c57f0a View commit details
    Browse the repository at this point in the history
  29. Rollup merge of rust-lang#59534 - laurmaedje:collapse-blanket-impls, …

    …r=GuillaumeGomez
    
    rustdoc: collapse blanket impls in the same way as normal impls
    
    If the rustdoc setting _Auto-hide trait implementations documentation_ is activated (on by default), normal trait implementations are collapsed by default.
    
    Blanket impls on the other hand are not collapsed. I'm not sure whether this is intended, but considering that the blanket impls for `From`, `Into`, `TryFrom`, ... are on every type, it would reduce the documentation bloat if these would also be collapsed when the setting is active.
    
    (I'm not really familiar with the codebase and therefore just copied the code for the normal impl collapsing, but I could deduplicate it into a method, of course, too.)
    Centril authored Mar 29, 2019
    Configuration menu
    Copy the full SHA
    9a53273 View commit details
    Browse the repository at this point in the history
  30. Rollup merge of rust-lang#59537 - goffrie:patch-3, r=Centril

    Fix OnceWith docstring.
    
    This was incorrectly copypasta'd from RepeatWith.
    Centril authored Mar 29, 2019
    Configuration menu
    Copy the full SHA
    dca1e72 View commit details
    Browse the repository at this point in the history