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 12 pull requests #101073

Closed

Commits on Jul 13, 2022

  1. Add a File::create_new constructor

    We have `File::create` for creating a file or opening an existing file,
    but the secure way to guarantee creating a new file requires a longhand
    invocation via `OpenOptions`.
    
    Add `File::create_new` to handle this case, to make it easier for people
    to do secure file creation.
    joshtriplett committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    e540425 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2022

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

Commits on Aug 21, 2022

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

Commits on Aug 22, 2022

  1. session: diagnostic migration lint on more fns

    Apply the diagnostic migration lint to more functions on `Session`.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed Aug 22, 2022
    Configuration menu
    Copy the full SHA
    e91cd39 View commit details
    Browse the repository at this point in the history
  2. errors: IntoDiagnosticArg for io::Error/paths

    Add impls of `IntoDiagnosticArg` for `std::io::Error`, `std::path::Path`
    and `std::path::PathBuf`.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed Aug 22, 2022
    Configuration menu
    Copy the full SHA
    e6a3632 View commit details
    Browse the repository at this point in the history
  3. incremental: migrate diagnostics

    Migrate the `rustc_incremental` crate's diagnostics to translatable
    diagnostic structs.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed Aug 22, 2022
    Configuration menu
    Copy the full SHA
    3becaaf View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2022

  1. Configuration menu
    Copy the full SHA
    6a1f7af View commit details
    Browse the repository at this point in the history
  2. Simplify unicode_downloads.rs

    Reduce duplication by moving fetching logic into a dedicated function.
    est31 committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    0a6af98 View commit details
    Browse the repository at this point in the history
  3. Change hint to correct path

    est31 committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    754b3e7 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2022

  1. Remove some documentation duplicated between writeln! and write!

    `writeln!` already includes a reference to `write!` for more
    information, so remove duplicated information.
    joshtriplett committed Aug 24, 2022
    Configuration menu
    Copy the full SHA
    a788650 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3c8618f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    589db1f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cb843a0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ae937cc View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2022

  1. Stabilize const_ptr_offset_from.

    Stabilization has been completed [here](rust-lang#92980 (comment))
    with a FCP.
    fee1-dead committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    ad93272 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    69ad634 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7529029 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2022

  1. rustdoc: omit start/end tags for empty item description blocks

    Related to rust-lang#100952
    
    This is definitely not a complete solution, but it does shrink
    keysyms/index.html on smithay from 620K to 516K.
    notriddle committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    e7b7f88 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4c27952 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a134cd4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    181ce39 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8bb4b5f View commit details
    Browse the repository at this point in the history
  6. Add IsTerminal trait to determine if a descriptor or handle is a te…

    …rminal
    
    The UNIX and WASI implementations use `isatty`. The Windows
    implementation uses the same logic the `atty` crate uses, including the
    hack needed to detect msys terminals.
    
    Implement this trait for `File` and for `Stdin`/`Stdout`/`Stderr` and
    their locked counterparts on all platforms. On UNIX and WASI, implement
    it for `BorrowedFd`/`OwnedFd`. On Windows, implement it for
    `BorrowedHandle`/`OwnedHandle`.
    
    Based on rust-lang#91121
    
    Co-authored-by: Matt Wilkinson <mattwilki17@gmail.com>
    joshtriplett and Matt Wilkinson committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    016e874 View commit details
    Browse the repository at this point in the history
  7. Make is_terminal fail fast if a process has no console at all

    If a process has no console, it'll have NULL in place of a console
    handle, so return early with `false` in that case without making any OS
    calls.
    joshtriplett committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    489b73b View commit details
    Browse the repository at this point in the history
  8. Rewrite FILE_NAME_INFO handling to avoid enlarging slice reference

    Rather than referencing a slice's pointer and then creating a new slice
    with a longer length, offset from the base structure pointer instead.
    This makes some choices of Rust semantics happier.
    joshtriplett committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    d2cceb7 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    72541dd View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2022

  1. Rollup merge of rust-lang#94890 - marmeladema:ip-addr-try-from-bytes,…

    … r=joshtriplett
    
    Support parsing IP addresses from a byte string
    
    Fixes rust-lang#94821
    
    The goal is to be able to parse addresses from a byte string without requiring to do any utf8 validation. Since internally the parser already works on byte strings, this should be possible and I personally already needed this in the past too.
    
    ~~I used the proposed approach from the issue by implementing `TryFrom<&'a [u8]>` for all 6 address types (3 ip address types and 3 socket address types). I believe implementing stable traits for stable types is insta-stable so this will probably need an FCP?~~
    
    Switched to an unstable inherent method approach called `parse_ascii` as requested.
    
    cc ``@jyn514``
    compiler-errors authored Aug 27, 2022
    Configuration menu
    Copy the full SHA
    4854239 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#96240 - fee1-dead-contrib:stabilize_const_o…

    …ffset_from, r=Mark-Simulacrum
    
    Stabilize `const_ptr_offset_from`.
    
    Stabilization has been completed [here](rust-lang#92980 (comment)) with a FCP.
    
    Closes rust-lang#92980.
    compiler-errors authored Aug 27, 2022
    Configuration menu
    Copy the full SHA
    de6ab5a View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#98033 - joshtriplett:is-terminal-fd-handle,…

    … r=thomcc
    
    Add `IsTerminal` trait to determine if a descriptor or handle is a terminal
    
    The UNIX implementation uses `isatty`. The Windows implementation uses
    the same logic the `atty` crate uses, including the hack needed to
    detect msys terminals.
    
    Implement this trait for `Stdin`/`Stdout`/`Stderr`/`File` on all
    platforms. On Unix, implement it for `BorrowedFd`/`OwnedFd`. On Windows,
    implement it for `BorrowedHandle`/`OwnedHandle`.
    
    Based on rust-lang#91121
    
    Co-authored-by: Matt Wilkinson <mattwilki17@gmail.com>
    compiler-errors and Matt Wilkinson authored Aug 27, 2022
    Configuration menu
    Copy the full SHA
    33b8db1 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#98801 - joshtriplett:file-create-new, r=thomcc

    Add a `File::create_new` constructor
    
    We have `File::create` for creating a file or opening an existing file,
    but the secure way to guarantee creating a new file requires a longhand
    invocation via `OpenOptions`.
    
    Add `File::create_new` to handle this case, to make it easier for people
    to do secure file creation.
    compiler-errors authored Aug 27, 2022
    Configuration menu
    Copy the full SHA
    9a0172c View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#99784 - est31:deny_cfg_attr_crate_type_name…

    …, r=Mark-Simulacrum
    
    Make forward compatibility lint deprecated_cfg_attr_crate_type_name deny by default
    
    Turns the forward compatibility lint added by rust-lang#83744 to deprecate `cfg_attr` usage with `#![crate_type]` and `#![crate_name]` attributes into deny by default. Copying the example from rust-lang#83744:
    
    ```Rust
    #![crate_type = "lib"] // remains working
    #![cfg_attr(foo, crate_type = "bin")] // will stop working
    ```
    
    Over 8 months have passed since rust-lang#83744 was merged so I'd say this gives ample time for people to have been warned, so we can make the warning stronger. No usage was found via grep.app except for one, which was in an unmaintained code base that didn't seem to be used in the open source eco system. The crater run conducted in rust-lang#83744 also didn't show up anything.
    
    cc rust-lang#91632 - tracking issue for the lint
    compiler-errors authored Aug 27, 2022
    Configuration menu
    Copy the full SHA
    2910abe View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#100754 - davidtwco:translation-incremental,…

    … r=compiler-errors
    
    incremental: migrate diagnostics
    
    - Apply the diagnostic migration lints to more functions on `Session`, namely: `span_warn`, `span_warn_with_code`, `warn` `note_without_error`, `span_note_without_error`, `struct_note_without_error`.
    - Add impls of `IntoDiagnosticArg` for `std::io::Error`, `std::path::Path` and `std::path::PathBuf`.
    - Migrate the `rustc_incremental` crate's diagnostics to translatable diagnostic structs.
    
    r? ```@compiler-errors```
    cc rust-lang#100717
    compiler-errors authored Aug 27, 2022
    Configuration menu
    Copy the full SHA
    bbed968 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#100811 - czzrr:master, r=Mark-Simulacrum

    Fix wrong compiletest filters on Windows
    
    As discussed in [rust-lang#79334](rust-lang#79334), when calling e.g.
    ```
    python x.py test src/test/ui/expr/compound-assignment/eval-order.rs
    ```
    on Windows, compiletest passes the filter `expr/compound-assignment/eval-order.rs` to libtest, which instead should be `expr\compound-assignment\eval-order.rs`, as that is the file found when collecting tests. This is what I fixed.
    
    I'm not sure how to organize a test for this. Any suggestions?
    compiler-errors authored Aug 27, 2022
    Configuration menu
    Copy the full SHA
    d9dd336 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#100924 - est31:closure_to_fn_ptr, r=Mark-Si…

    …mulacrum
    
    Smaller improvements of tidy and the unicode generator
    compiler-errors authored Aug 27, 2022
    Configuration menu
    Copy the full SHA
    00f0ba0 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#100953 - joshtriplett:write-docs, r=Mark-Si…

    …mulacrum
    
    Update documentation for `write!` and `writeln!`
    
    rust-lang#37472 added this documentation, but it
    needs updating:
    
    - Remove some documentation duplicated between `writeln!` and `write!`
    - Update `write!` docs: can now import traits as `_` to avoid conflicts
    - Expand example to show how to implement qualified trait names
    compiler-errors authored Aug 27, 2022
    Configuration menu
    Copy the full SHA
    2fd242c View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#100970 - Xiretza:derive-multipart-suggestio…

    …n, r=davidtwco
    
    Allow deriving multipart suggestions
    
    This turned into a bit more of a rewrite than I was initially hoping for... Still, I think the `SessionSubdiagnostic` derive is a little cleaner overall now, and closer to the `SessionDiagnostic` derive to make future code sharing easier.
    
    r? `@davidtwco`
    compiler-errors authored Aug 27, 2022
    Configuration menu
    Copy the full SHA
    2f50d33 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#101002 - estebank:hashmap-idx, r=davidtwco

    Provide structured suggestion for `hashmap[idx] = val`
    compiler-errors authored Aug 27, 2022
    Configuration menu
    Copy the full SHA
    5cc0d3a View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#101018 - notriddle:notriddle/item-right-doc…

    …block-short, r=GuillaumeGomez
    
    rustdoc: omit start/end tags for empty item description blocks
    
    Related to rust-lang#100952
    
    This is definitely not a complete solution, but it does shrink keysyms/index.html on smithay from 620K to 516K.
    compiler-errors authored Aug 27, 2022
    Configuration menu
    Copy the full SHA
    8468c71 View commit details
    Browse the repository at this point in the history