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 #101026

Closed
wants to merge 32 commits into from
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 26, 2022

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

Commits on Aug 20, 2022

  1. Configuration menu
    Copy the full SHA
    bafb10d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d34df43 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c542245 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8654522 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c11fa89 View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2022

  1. Configuration menu
    Copy the full SHA
    73ae38b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0043d10 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1382d30 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d75fd91 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5164966 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e701c72 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9472df1 View commit details
    Browse the repository at this point in the history
  8. Resolve conflicts

    JeanCASPAR committed Aug 22, 2022
    Configuration menu
    Copy the full SHA
    5fef1b8 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2022

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

Commits on Aug 24, 2022

  1. Configuration menu
    Copy the full SHA
    4e97626 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4ff5872 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d464d3a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8189a45 View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2022

  1. 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 mattwilkinsonn committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    d82e6b3 View commit details
    Browse the repository at this point in the history
  2. 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 25, 2022
    Configuration menu
    Copy the full SHA
    a7e5dc2 View commit details
    Browse the repository at this point in the history
  3. 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 25, 2022
    Configuration menu
    Copy the full SHA
    6c5c32b View commit details
    Browse the repository at this point in the history
  4. rustdoc: remove unused CSS for .variants_table

    Continuation of rust-lang#100938 and rust-lang#101010. This rule was added to support the old,
    table-based style for displaying enum variants, which are now displayed using
    headers and paragraphs.
    notriddle committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    8c65478 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2022

  1. 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>
    Dylan-DPC and mattwilkinsonn committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    f489703 View commit details
    Browse the repository at this point in the history
  2. 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.
    Dylan-DPC committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    5050988 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#99742 - sigaloid:master, r=thomcc

    Add comments about stdout locking
    
    This is the source of some confusion regarding the `println!` macro:
    * https://llogiq.github.io/2017/06/01/perf-pitfalls.html#unbuffered-io
    * https://news.ycombinator.com/item?id=18794930
    * https://reddit.com/r/rust/comments/5puyx2/why_is_println_so_slow/dcua5g5/
    * https://reddit.com/r/rust/comments/ab7hsi/comparing_pythagorean_triples_in_c_d_and_rust/ecy7ql8/
    
    In some of these cases it's not the locking behavior where the bottleneck lies, but it's still mentioned as a surprise when, eg, benchmarking a million `println!`'s in a very tight loop.
    
    If there's any stylistic problems please feel free to correct me! This is my first contribution and I want to get it right 🦀
    Dylan-DPC committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    b464d5f View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#100043 - RalfJung:scalar-always-init, r=oli…

    …-obk
    
    interpret: remove support for uninitialized scalars
    
    With Miri no longer supporting `-Zmiri-allow-uninit-numbers`, we no longer need to support storing uninit data in a `Scalar`. We anyway already only use this representation for types with *initialized* `Scalar` layout (and we have to, due to partial initialization), so let's get rid of the `ScalarMaybeUninit` type entirely.
    
    I tried to stage this into meaningful commits, but the one that changes `read_immediate` to always trigger UB on uninit is the largest chunk of the PR and I don't see how it could be subdivided.
    
    Fixes rust-lang/miri#2187
    r? ``@oli-obk``
    Dylan-DPC committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    6a5521f View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#100437 - compiler-errors:better-const-misma…

    …tch-err, r=oli-obk
    
    Improve const mismatch `FulfillmentError`
    
    Fixes rust-lang#100414
    Dylan-DPC committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    57d438f View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#100724 - JeanCASPAR:migrate-ast_lowering-to…

    …-session-diagnostic, r=davidtwco
    
    Migrate ast lowering to session diagnostic
    
    I migrated the whole rustc_ast_lowering crate to session diagnostic *except* the for the use of `span_fatal` at /compiler/rustc_ast_lowering/src/expr.rs#L1268 because `#[fatal(...)]` is not yet supported (see rust-lang#100694).
    Dylan-DPC committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    ef95092 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#100897 - RalfJung:const-not-to-mutable, r=lcnr

    extra sanity check against consts pointing to mutable memory
    
    This should be both unreachable and redundant (since we already ensure that validation only reads from read-only memory, when validating consts), but I feel like we cannot be paranoid enough here, and also if this ever fails it'll be a nicer error than the "cannot read from mutable memory" error.
    Dylan-DPC committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    2122c6e View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#101012 - notriddle:notriddle/variants_table…

    …, r=jsha
    
    rustdoc: remove unused CSS for `.variants_table`
    
    Continuation of rust-lang#100938 and rust-lang#101010. This rule was added to support the old, table-based style for displaying enum variants, which are now displayed using headers and paragraphs.
    Dylan-DPC committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    b125b05 View commit details
    Browse the repository at this point in the history