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 13 pull requests #67964

Merged
merged 30 commits into from
Jan 7, 2020
Merged

Rollup of 13 pull requests #67964

merged 30 commits into from
Jan 7, 2020

Commits on Jan 4, 2020

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

Commits on Jan 5, 2020

  1. Handle multiple error fix suggestions carefuly

    The existing code seems to assume that substitutions spans are disjoint,
    which is not always the case.
    
    In the example:
    
        pub trait AAAA {}
        pub trait B {}
        pub trait C {}
        pub type T<P: AAAA + B + C> = P;
    
    , we get three substituions starting from ':' and ending respectively at
    the end of each trait token.
    
    With the former offset calculation, this would cause `underline_start` to
    eventually become negative before being converted to `usize`...
    
    The new version may report erroneous results for non perfectly overlapping
    substitutions but I don't know if such examples exist. Alternatively, we
    could detect these cases and trim out overlapping substitutions.
    lbonn committed Jan 5, 2020
    Configuration menu
    Copy the full SHA
    12545c7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e2305d0 View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2020

  1. Fix ICE in const pretty printing and resolve FIXME

    Consts now have a `fmt::Display` impl, so we can just use that to pretty-print.
    varkor committed Jan 6, 2020
    Configuration menu
    Copy the full SHA
    8f94d9b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e6d95ce View commit details
    Browse the repository at this point in the history
  3. stabilise remove_item

    Dylan-DPC committed Jan 6, 2020
    Configuration menu
    Copy the full SHA
    24c6cd8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0a739ce View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    99fda5c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a7727c5 View commit details
    Browse the repository at this point in the history
  7. stabilise it

    Dylan-DPC committed Jan 6, 2020
    Configuration menu
    Copy the full SHA
    6bec8e9 View commit details
    Browse the repository at this point in the history
  8. Add an unstable conversion from thread ID to u64

    We see multiple cases inside rustc and ecosystem code where ThreadId is
    transmuted to u64, exploiting the underlying detail. This is suboptimal
    (can break unexpectedly if we change things in std).
    
    It is unlikely that ThreadId will ever need to be larger than u64 --
    creating even 2^32 threads over the course of a program is quite hard,
    2^64 is even harder. As such, we do not choose to return a larger sized
    type (e.g. u128). If we choose to shrink ThreadId in the future, or
    otherwise change its internals, it is likely that a mapping to u64 will
    still be applicable (though may become more complex).
    Mark-Simulacrum committed Jan 6, 2020
    Configuration menu
    Copy the full SHA
    d9a7db9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0113cac View commit details
    Browse the repository at this point in the history
  10. Removed module usage.

    Stromberg90 authored Jan 6, 2020
    Configuration menu
    Copy the full SHA
    a852941 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    503d06b View commit details
    Browse the repository at this point in the history
  12. Improve hygiene of newtype_index

    Also add unit tests
    matthewjasper committed Jan 6, 2020
    Configuration menu
    Copy the full SHA
    9462c8b View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    2905f14 View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2020

  1. Update books

    ehuss committed Jan 7, 2020
    Configuration menu
    Copy the full SHA
    518f50c View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#67566 - Mark-Simulacrum:thread-id-u64, r=al…

    …excrichton
    
    Add an unstable conversion from thread ID to u64
    
    We see multiple cases inside rustc and ecosystem code where ThreadId is
    transmuted to u64, exploiting the underlying detail. This is suboptimal
    (can break unexpectedly if we change things in std).
    
    It is unlikely that ThreadId will ever need to be larger than u64 --
    creating even 2^32 threads over the course of a program is quite hard,
    2^64 is even harder. As such, we do not choose to return a larger sized
    type (e.g. u128). If we choose to shrink ThreadId in the future, or
    otherwise change its internals, it is likely that a mapping to u64 will
    still be applicable (though may become more complex).
    
    I will file a tracking issue as soon as this is loosely approved.
    JohnTitor authored Jan 7, 2020
    Configuration menu
    Copy the full SHA
    c671fc1 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#67671 - estebank:type-impl-trait, r=davidtwco

    Account for `type X = impl Trait;` in lifetime suggestion
    
    Fix rust-lang#67619.
    JohnTitor authored Jan 7, 2020
    Configuration menu
    Copy the full SHA
    3cce950 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#67727 - Dylan-DPC:stabilise/remove_item, r=…

    …alexcrichton
    
    Stabilise vec::remove_item
    
    Closes rust-lang#40062
    
    r? @alexcrichton
    JohnTitor authored Jan 7, 2020
    Configuration menu
    Copy the full SHA
    4ed415b View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#67877 - dtolnay:const-_, r=nagisa

    Omit underscore constants from rustdoc
    
    Underscore constants from rust-lang/rfcs#2526 / rust-lang#54912 do not correspond to a nameable item and so are never useful in documentation.
    <br>
    
    #### Before:
    
    > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://user-images.githubusercontent.com/1940490/71771409-0427cc80-2eef-11ea-8b7d-d9c74a873e7e.png" width="60%">
    
    #### After:
    
    > Not that.
    JohnTitor authored Jan 7, 2020
    Configuration menu
    Copy the full SHA
    74ca7c7 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#67880 - lbonn:fix/multi-substs, r=petrochenkov

    Handle multiple error fix suggestions carefuly
    
    The existing code seems to assume that substitutions spans are disjoint,
    which is not always the case.
    
    In the example:
    
        pub trait AAAA {}
        pub trait B {}
        pub trait C {}
        pub type T<P: AAAA + B + C> = P;
    
    , we get three substituions starting from ':' and ending respectively at
    the end of each trait token.
    
    With the former offset calculation, this would cause `underline_start` to
    eventually become negative before being converted to `usize`...
    
    The new version may report erroneous results for non perfectly overlapping
    substitutions but I don't know if such examples exist. Alternatively, we
    could detect these cases and trim out overlapping substitutions.
    
    Fixes rust-lang#67690
    JohnTitor authored Jan 7, 2020
    Configuration menu
    Copy the full SHA
    6d9913d View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#67898 - matthewjasper:newtype-index-hygiene…

    …, r=Centril
    
    Improve hygiene of `newtype_index`
    
    `newtype_index` no longer needs `rustc_index::vec::Idx` to be in scope.
    
    r? @Centril
    JohnTitor authored Jan 7, 2020
    Configuration menu
    Copy the full SHA
    9ef3b2c View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#67908 - ollie27:rustdoc_const_html_escape, …

    …r=GuillaumeGomez
    
    rustdoc: HTML escape const values
    
    r? @GuillaumeGomez
    JohnTitor authored Jan 7, 2020
    Configuration menu
    Copy the full SHA
    c07204b View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#67909 - varkor:obsolete-const-print, r=davi…

    …dtwco
    
    Fix ICE in const pretty printing and resolve FIXME
    
    Consts now have a `fmt::Display` impl, so we can just use that to pretty-print.
    
    This resolves an ICE in rust-lang#61936, though it hits more ICEs afterwards. I couldn't find a test case that was resolved by this that didn't hit errors later on.
    JohnTitor authored Jan 7, 2020
    Configuration menu
    Copy the full SHA
    318d6c2 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#67929 - mgrachev:patch-1, r=jonas-schievink

    Formatting an example for method Vec.retain
    JohnTitor authored Jan 7, 2020
    Configuration menu
    Copy the full SHA
    2c25ad5 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#67934 - GuillaumeGomez:clean-up-e0178, r=Dy…

    …lan-DPC
    
    Clean up E0178 explanation
    
    r? @Dylan-DPC
    JohnTitor authored Jan 7, 2020
    Configuration menu
    Copy the full SHA
    1e7a6a8 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#67936 - euclio:assoc-type-bad-style, r=Centril

    fire "non_camel_case_types" for associated types
    
    Fixes rust-lang#67920.
    JohnTitor authored Jan 7, 2020
    Configuration menu
    Copy the full SHA
    b065031 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#67943 - Stromberg90:patch-1, r=jonas-schievink

    Missing module std in example.
    JohnTitor authored Jan 7, 2020
    Configuration menu
    Copy the full SHA
    05797b1 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#67962 - ehuss:update-books, r=ehuss

    Update books
    
    ## nomicon
    
    1 commits in 8be35b201f9cf0a4c3fcc96c83ac21671dcf3112..3e6e1001dc6e095dbd5c88005e80969f60e384e1
    2019-12-01 13:02:12 -0500 to 2019-12-14 22:08:52 +0000
    - Remove mention of contravariance possibly getting scrapped (rust-lang/nomicon#177)
    
    ## reference
    
    4 commits in d8dfe1b..e115753
    2019-12-14 21:04:58 +0100 to 2019-12-22 13:13:14 +0100
    - Fix typo in macros-by-example.md (rust-lang/reference#733)
    - Remove `extern` from exception list (rust-lang/reference#732)
    - Added clearification that closures are refered to lambdas (rust-lang/reference#731)
    - abi.md: clarify #[used] and linking (rust-lang/reference#712)
    
    ## book
    
    2 commits in ef8bb568035ded8ddfa30a9309026638cc3c8136..5c5cfd2e94cd42632798d9bd3d1116133e128ac9
    2019-11-28 11:00:04 -0600 to 2019-12-16 09:27:21 -0600
    - document new --show-output option in ch 11-2 (Rust &gt;= 1.39) (rust-lang/book#2065)
    - Fix sentence in ch07 (rust-lang/book#2183)
    
    ## rust-by-example
    
    3 commits in b7ac1bc76b7d02a43c83b3a931d226f708aa1ff4..1d59403cb5269c190cc52a95584ecc280345495a
    2019-12-02 11:38:43 -0300 to 2019-12-27 08:27:05 -0300
    - Enable section-folding of table of content (rust-lang/rust-by-example#1290)
    - Remove unnecessary lifetime annotation (rust-lang/rust-by-example#1300)
    - eliminate the warnings (rust-lang/rust-by-example#1301)
    
    ## edition-guide
    
    1 commits in 6601cab4666596494a569f94aa63b7b3230e9769..1a2390247ad6d08160e0dd74f40a01a9578659c2
    2019-11-22 12:08:58 -0500 to 2019-12-29 10:40:55 -0800
    - Updated install and uninstall instructions (rust-lang/edition-guide#194)
    
    ## embedded-book
    
    1 commits in c26234930282210849256e4ecab925f0f2daf3be..9493b7d4dc97eda439bd8780f05ad7b234cd1cd7
    2019-12-07 17:25:11 +0000 to 2019-12-27 20:05:00 +0000
    - fixed typo in Interrupts.md  (rust-embedded/book#218)
    JohnTitor authored Jan 7, 2020
    Configuration menu
    Copy the full SHA
    23d9788 View commit details
    Browse the repository at this point in the history