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

Merged
merged 26 commits into from
Aug 29, 2022
Merged

Rollup of 8 pull requests #101152

merged 26 commits into from
Aug 29, 2022

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 Aug 3, 2022

  1. Configuration menu
    Copy the full SHA
    39bc74e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    236ccce View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    99e2d33 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    63c3aab View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    421bb6a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    48bae93 View commit details
    Browse the repository at this point in the history
  7. Simplify debugging.

    cjgillot committed Aug 3, 2022
    Configuration menu
    Copy the full SHA
    a424090 View commit details
    Browse the repository at this point in the history
  8. Assert index sanity.

    cjgillot committed Aug 3, 2022
    Configuration menu
    Copy the full SHA
    c95ff1d View commit details
    Browse the repository at this point in the history
  9. Bless incremental tests.

    cjgillot committed Aug 3, 2022
    Configuration menu
    Copy the full SHA
    da90ec1 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2022

  1. Make use of [wrapping_]byte_{add,sub}

    ...replacing `.cast().wrapping_offset().cast()` & similar code.
    WaffleLapkin committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    53565b2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3aa6fe3 View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2022

  1. Add MaybeUninit memset test

    Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
    SUPERCILEX committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    8c62cc2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1b044da View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    aebad39 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2022

  1. Configuration menu
    Copy the full SHA
    4173e97 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aff9841 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2022

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

Commits on Aug 29, 2022

  1. Rollup merge of rust-lang#98304 - SUPERCILEX:maybeuninit, r=nikic

    Add MaybeUninit memset test
    
    Closes rust-lang#96274
    Dylan-DPC authored Aug 29, 2022
    Configuration menu
    Copy the full SHA
    4cac0bf 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 authored Aug 29, 2022
    Configuration menu
    Copy the full SHA
    1999ed7 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#99821 - cjgillot:ast-lifetimes-2, r=compile…

    …r-errors
    
    Remove separate indexing of early-bound regions
    
    ~Based on rust-lang#99728
    
    This PR copies some modifications from rust-lang#97839 around object lifetime defaults.
    These modifications allow to stop counting generic parameters during lifetime resolution, and rely on the indexing given by `rustc_typeck::collect`.
    Dylan-DPC authored Aug 29, 2022
    Configuration menu
    Copy the full SHA
    5555e13 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#100239 - RalfJung:const-prop-uninit, r=oli-obk

    remove an ineffective check in const_prop
    
    Based on rust-lang#100043, only the last two commits are new.
    
    ConstProp has a special check when reading from a local that prevents reading uninit locals. However, if that local flows into `force_allocation`, then no check fires and evaluation proceeds. So this check is not really effective at preventing accesses to uninit locals.
    
    With rust-lang#100043, `read_immediate` and friends always fail when reading uninit locals, so I don't see why ConstProp would need a separate check. Thus I propose we remove it. This is needed to be able to do rust-lang#100085.
    Dylan-DPC authored Aug 29, 2022
    Configuration menu
    Copy the full SHA
    3ea5456 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#100337 - camelid:stabilize-io_read_to_strin…

    …g, r=JohnTitor
    
    Stabilize `std::io::read_to_string`
    
    Closes rust-lang#80218. 🎉
    
    This PR stabilizes the `std::io::read_to_string` function, with the following public API:
    
    ```rust
    pub fn read_to_string<R: Read>(reader: R) -> Result<String>;
    ```
    
    It's analogous to `std::fs::read_to_string` for files, but it works on anything that implements `io::Read`, including `io::stdin()`.
    
    See the tracking issue (rust-lang#80218) or documentation for details.
    Dylan-DPC authored Aug 29, 2022
    Configuration menu
    Copy the full SHA
    9f7e20b View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#100819 - WaffleLapkin:use_ptr_byte_methods,…

    … r=scottmcm
    
    Make use of `[wrapping_]byte_{add,sub}`
    
    These new methods trivially replace old `.cast().wrapping_offset().cast()` & similar code.
    Note that [`arith_offset`](https://doc.rust-lang.org/std/intrinsics/fn.arith_offset.html) and `wrapping_offset` are the same thing.
    
    r? ``@scottmcm``
    
    _split off from #100746_
    Dylan-DPC authored Aug 29, 2022
    Configuration menu
    Copy the full SHA
    395ce34 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#100934 - a1phyr:improve_fmt_PadAdapter, r=M…

    …ark-Simulacrum
    
    Remove a panicking branch from `fmt::builders::PadAdapter`
    Dylan-DPC authored Aug 29, 2022
    Configuration menu
    Copy the full SHA
    141728f View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#101000 - m-ou-se:count-is-star, r=nagisa

    Separate CountIsStar from CountIsParam in rustc_parse_format.
    
    `rustc_parse_format`'s parser would result in the exact same output for `{:.*}` and `{:.0$}`, making it hard for diagnostics to handle these cases properly.
    
    This splits those cases by adding a new `CountIsStar` enum variant.
    
    This fixes rust-lang#100995
    
    Prerequisite for rust-lang#100996
    Dylan-DPC authored Aug 29, 2022
    Configuration menu
    Copy the full SHA
    0b6faca View commit details
    Browse the repository at this point in the history