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 4 pull requests #99399

Closed
wants to merge 9 commits into from
Closed

Commits on Jul 3, 2022

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

Commits on Jul 8, 2022

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

Commits on Jul 14, 2022

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

Commits on Jul 18, 2022

  1. Add regression test for rust-lang#95230

    Signed-off-by: Yuki Okushi <jtitor@2k36.org>
    JohnTitor committed Jul 18, 2022
    Configuration menu
    Copy the full SHA
    5172a2f View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#98839 - 5225225:assert_transmute_copy_size,…

    … r=thomcc
    
    Add assertion that `transmute_copy`'s U is not larger than T
    
    This is called out as a safety requirement in the docs, but because knowing this can be done at compile time and constant folded (just like the `align_of` branch is removed), we can just panic here.
    
    I've looked at the asm (using `cargo-asm`) of a function that both is correct and incorrect, and the panic is completely removed, or is unconditional, without needing build-std.
    
    I don't expect this to cause much breakage in the wild. I scanned through https://miri.saethlin.dev/ub for issues that would look like this (error: Undefined Behavior: memory access failed: alloc1768 has size 1, so pointer to 8 bytes starting at offset 0 is out-of-bounds), but couldn't find any.
    
    That doesn't rule out it happening in crates tested that fail earlier for some other reason, though, but it indicates that doing this is rare, if it happens at all. A crater run for this would need to be build and test, since this is a runtime thing.
    
    Also added a few more transmute_copy tests.
    Dylan-DPC authored Jul 18, 2022
    Configuration menu
    Copy the full SHA
    899aff6 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#99058 - michaelwoerister:remove-stable-set-…

    …and-map, r=nagisa
    
    Remove the unused StableSet and StableMap types from rustc_data_structures.
    
    The current implementation is not "stable" in the same sense that `HashStable` and `StableHasher` are stable, i.e. across compilation sessions. So, in my opinion, it's better to remove those types (which are basically unused anyway) than to give the wrong impression that these are safe for incr. comp.
    
    I plan to provide new "stable" collection types soon that can be used to replace `FxHashMap` and `FxHashSet` in query results (see [draft](michaelwoerister@69d03ac)). It's unsound that `HashMap` and `HashSet` implement `HashStable` (see rust-lang#98890 for a recent P-critical bug caused by this) -- so we should make some progress there.
    Dylan-DPC authored Jul 18, 2022
    Configuration menu
    Copy the full SHA
    3d07d30 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#99198 - RalfJung:alloc-null-ptr, r=JohnTitor

    add missing null ptr check in alloc example
    
    `alloc` can return null on OOM, if I understood correctly. So we should never just deref a pointer we get from `alloc`.
    Dylan-DPC authored Jul 18, 2022
    Configuration menu
    Copy the full SHA
    dec007f View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#99394 - JohnTitor:issue-95230, r=compiler-e…

    …rrors
    
    Add regression test for rust-lang#95230
    
    Closes rust-lang#95230
    r? `@compiler-errors`
    
    Signed-off-by: Yuki Okushi <jtitor@2k36.org>
    Dylan-DPC authored Jul 18, 2022
    Configuration menu
    Copy the full SHA
    307f864 View commit details
    Browse the repository at this point in the history