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 8 pull requests #84554

Closed
wants to merge 30 commits into from

Commits on Apr 16, 2021

  1. Configuration menu
    Copy the full SHA
    756be4a View commit details
    Browse the repository at this point in the history
  2. added default for StyledChar

    klensy committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    f522991 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e97dded View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7e9d3c6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    247d74f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    cb2d522 View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2021

  1. Configuration menu
    Copy the full SHA
    e4ce655 View commit details
    Browse the repository at this point in the history
  2. add tests for new behavior

    syvb committed Apr 23, 2021
    Configuration menu
    Copy the full SHA
    fc97ce6 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2021

  1. Add regression test

    estebank committed Apr 24, 2021
    Configuration menu
    Copy the full SHA
    8629017 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    64ee9cc View commit details
    Browse the repository at this point in the history
  3. Tweak suggestion output

    estebank committed Apr 24, 2021
    Configuration menu
    Copy the full SHA
    fb1fb7d View commit details
    Browse the repository at this point in the history
  4. Implemented suggestion.

    Tor Hovland committed Apr 24, 2021
    Configuration menu
    Copy the full SHA
    ad78b50 View commit details
    Browse the repository at this point in the history
  5. Added a test.

    Tor Hovland committed Apr 24, 2021
    Configuration menu
    Copy the full SHA
    0e7489a View commit details
    Browse the repository at this point in the history
  6. Refactor.

    Tor Hovland committed Apr 24, 2021
    Configuration menu
    Copy the full SHA
    8bc81a0 View commit details
    Browse the repository at this point in the history
  7. More tests.

    Tor Hovland committed Apr 24, 2021
    Configuration menu
    Copy the full SHA
    05a5a11 View commit details
    Browse the repository at this point in the history
  8. review

    klensy committed Apr 24, 2021
    Configuration menu
    Copy the full SHA
    8ebd811 View commit details
    Browse the repository at this point in the history
  9. One more test case.

    Tor Hovland committed Apr 24, 2021
    Configuration menu
    Copy the full SHA
    3b50461 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2021

  1. Inline most raw socket, fd and handle conversions

    KaiJewson committed Apr 25, 2021
    Configuration menu
    Copy the full SHA
    fbc2aad View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    75bab07 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    34e5127 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8a961a5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ba9d143 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#84235 - klensy:styled-buffer, r=lcnr

    refactor StyledBuffer
    
    Refactors StyledBuffer `text` and `styles` fields content into StyledChar and touches some other stuff.
    Dylan-DPC authored Apr 25, 2021
    Configuration menu
    Copy the full SHA
    75e1331 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#84486 - Smittyvb:else-if-let-hir-pretty-pri…

    …nt, r=petrochenkov
    
    Handle pretty printing of `else if let` clauses without ICEing
    
    When pretty printing the HIR of `if ... {} else if let ... {}` clauses, this displays it the `else if let` part as `match` it gets desugared to, the same way normal `if let` statements are currently displayed, instead of ICEing.
    
    ```rust
    pub fn main() {
        if true {
            // 1
        } else if let a = 1 {
            // 2
        } else {
            // 3
        }
    }
    ```
    
    now gets desugared (via `rustc -Zunpretty=hir,typed src/x.rs`) to:
    
    ```rust
    #[prelude_import]
    use ::std::prelude::rust_2015::*;
    #[macro_use]
    extern crate std;
    pub fn main() ({
                       (if (true as bool)
                           ({
                                // 1
                            } as
                               ()) else {match (1 as i32) {
                                             a => {
                                                 // 2
                                             }
                                             _ => {
                                                 // 3
                                             }
                                         }} as ())
                        } as ())
    ```
    
    For comparison, this code gets HIR prettyprinted the same way before and after this change:
    
    ```rust
    pub fn main() {
        if let a = 1 {
            // 2
        } else {
            // 3
        }
    }
    ```
    turns into
    ```rust
    #[prelude_import]
    use ::std::prelude::rust_2015::*;
    #[macro_use]
    extern crate std;
    pub fn main() ({
                       (match (1 as i32) {
                            a => {
                                // 2
                            }
                            _ => {
                                // 3
                            }
                        } as ())
                   } as ())
    ```
    
    This closes rust-lang#82329. It closes rust-lang#84434 as well, due to having the same root cause.
    Dylan-DPC authored Apr 25, 2021
    Configuration menu
    Copy the full SHA
    e324a36 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#84499 - estebank:issue-84272, r=jackh726

    Tweak trait not `use`d suggestion
    
    Fix rust-lang#84272. Follow up to rust-lang#83667.
    Dylan-DPC authored Apr 25, 2021
    Configuration menu
    Copy the full SHA
    5aca6da View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#84516 - torhovland:issue-84114, r=estebank

    Add suggestion to "use break" when attempting to implicit-break a loop
    
    Fixes rust-lang#84114
    Dylan-DPC authored Apr 25, 2021
    Configuration menu
    Copy the full SHA
    c53aeb2 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#84541 - KaiJewson:inline-raw, r=m-ou-se

    Inline most raw socket, fd and handle conversions
    
    Now that file descriptor types on Unix have niches, it is advantageous for user libraries which provide file descriptor wrappers (e.g. `Socket` from socket2) to store a `File` internally instead of a `RawFd`, so that the niche can be taken advantage of. However, doing so will currently result in worse performance as `IntoRawFd`, `FromRawFd` and `AsRawFd` are not inlined. This change adds `#[inline]` to those methods on std types that wrap file descriptors, handles or sockets.
    Dylan-DPC authored Apr 25, 2021
    Configuration menu
    Copy the full SHA
    684592d View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#84543 - paolobarbolini:reverse_bits-const-s…

    …ince, r=m-ou-se
    
    Fix 'const-stable since' of reverse_bits
    
    This fixes the const_stable `since` of `reverse_bits` for the signed and unsigned integer types. The previous value was incorrect, as it pointed to an older version where `reverse_bits` hadn't been stabilized yet.
    
    `reverse_bits` was const-stable from the start, as can be seen from:
    
    https://doc.rust-lang.org/1.37.0/std/primitive.u32.html#method.reverse_bits
    https://doc.rust-lang.org/1.37.0/std/primitive.i32.html#method.reverse_bits
    Dylan-DPC authored Apr 25, 2021
    Configuration menu
    Copy the full SHA
    9063dc6 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#84544 - RalfJung:const_fn_in_trait, r=oli-obk

    Always reject `const fn` in `trait` during parsing.
    
    'const fn' in trait are rejected in the AST:
    https://github.com/rust-lang/rust/blob/b78c0d8a4d5af91a4a55d029293e3ecb879ec142/compiler/rustc_ast_passes/src/ast_validation.rs#L1411
    So this feature gate check is a NOP and we can just remove it.
    
    The src/test/ui/feature-gates/feature-gate-min_const_fn.rs and src/test/ui/feature-gates/feature-gate-const_fn.rs tests ensure that we still reject `const fn` in `trait`
    
    Cc rust-lang#84510
    r? ``@oli-obk``
    Dylan-DPC authored Apr 25, 2021
    Configuration menu
    Copy the full SHA
    5f946b1 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#84546 - CohenArthur:fix-liveness-typo, r=jy…

    …n514
    
    Fix typo  in report_unsed_assign
    
    The function was called `report_unsed_assign`, which I assume is a typo, considering the rest of the file.
    This replaces `report_unsed_assign` with `report_unused_assign`.
    Dylan-DPC authored Apr 25, 2021
    Configuration menu
    Copy the full SHA
    c645523 View commit details
    Browse the repository at this point in the history