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

Merged
merged 18 commits into from
Apr 9, 2022
Merged

Rollup of 8 pull requests #95835

merged 18 commits into from
Apr 9, 2022

Commits on Mar 27, 2022

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

Commits on Apr 7, 2022

  1. Configuration menu
    Copy the full SHA
    39bff4b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5974c18 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    aa3c141 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2022

  1. Configuration menu
    Copy the full SHA
    43d0497 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5e8bd9b View commit details
    Browse the repository at this point in the history
  3. WIP PROOF-OF-CONCEPT: Make the compiler complain about all int<->ptr …

    …casts.
    
    ALL
    
    OF
    
    THEM
    Gankra authored and niluxv committed Apr 8, 2022
    Configuration menu
    Copy the full SHA
    1040cab View commit details
    Browse the repository at this point in the history
  4. Split fuzzy_provenance_casts into lossy and fuzzy, feature gate and…

    … test it
    
    * split `fuzzy_provenance_casts` into a ptr2int and a int2ptr lint
    * feature gate both lints
    * update documentation to be more realistic short term
    * add tests for these lints
    niluxv committed Apr 8, 2022
    Configuration menu
    Copy the full SHA
    98a4834 View commit details
    Browse the repository at this point in the history
  5. Add ThinBox type for 1 stack pointer sized heap allocated trait objects

    Relevant commit messages from squashed history in order:
    
    Add initial version of ThinBox
    
    update test to actually capture failure
    
    swap to middle ptr impl based on matthieu-m's design
    
    Fix stack overflow in debug impl
    
    The previous version would take a `&ThinBox<T>` and deref it once, which
    resulted in a no-op and the same type, which it would then print causing
    an endless recursion. I've switched to calling `deref` by name to let
    method resolution handle deref the correct number of times.
    
    I've also updated the Drop impl for good measure since it seemed like it
    could be falling prey to the same bug, and I'll be adding some tests to
    verify that the drop is happening correctly.
    
    add test to verify drop is behaving
    
    add doc examples and remove unnecessary Pointee bounds
    
    ThinBox: use NonNull
    
    ThinBox: tests for size
    
    Apply suggestions from code review
    
    Co-authored-by: Alphyr <[email protected]>
    
    use handle_alloc_error and fix drop signature
    
    update niche and size tests
    
    add cfg for allocating APIs
    
    check null before calculating offset
    
    add test for zst and trial usage
    
    prevent optimizer induced ub in drop and cleanup metadata gathering
    
    account for arbitrary size and alignment metadata
    
    Thank you nika and thomcc!
    
    Update library/alloc/src/boxed/thin.rs
    
    Co-authored-by: Josh Triplett <[email protected]>
    
    Update library/alloc/src/boxed/thin.rs
    
    Co-authored-by: Josh Triplett <[email protected]>
    yaahc and joshtriplett committed Apr 8, 2022
    Configuration menu
    Copy the full SHA
    a87a0d0 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2022

  1. Remove explicit delimiter token trees from Delimited.

    They were introduced by the final commit in rust-lang#95159 and gave a
    performance win. But since the introduction of `MatcherLoc` they are no
    longer needed. This commit reverts that change, making the code a bit
    simpler.
    nnethercote committed Apr 9, 2022
    Configuration menu
    Copy the full SHA
    7450c4e View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#90066 - yaahc:thinbox, r=joshtriplett

    Add new ThinBox type for 1 stack pointer wide heap allocated trait objects
    
    **Zulip Thread**: https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/ThinBox
    
    Based on https://github.com/matthieu-m/rfc2580/blob/b58d1d3cba0d4b5e859d3617ea2d0943aaa31329/examples/thin.rs
    
    Tracking Issue: rust-lang#92791
    
    Usage Trial: https://github.com/yaahc/pgx/pull/1/files
    
    ## TODO
    
    - [x] make sure to test with #[repr(align(1024))] structs etc
    Dylan-DPC authored Apr 9, 2022
    Configuration menu
    Copy the full SHA
    ee8cea8 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#95374 - RalfJung:assert_uninit_valid, r=Mar…

    …k-Simulacrum
    
    assert_uninit_valid: ensure we detect at least arrays of uninhabited types
    
    We can't easily extend this check to *all* arrays (Cc rust-lang#87041), but it turns out the existing check already catches arrays of uninhabited types. So let's make sure it stays that way by adding them to the test.
    Dylan-DPC authored Apr 9, 2022
    Configuration menu
    Copy the full SHA
    9010879 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#95599 - niluxv:strict-provenance-lint, r=mi…

    …chaelwoerister
    
    Strict provenance lints
    
    See rust-lang#95488.
    This PR introduces two unstable (allow by default) lints to which lint on int2ptr and ptr2int casts, as the former is not possible in the strict provenance model and the latter can be written nicer using the `.addr()` API.
    Based on an initial version of the lint by ```@Gankra``` in rust-lang#95199.
    Dylan-DPC authored Apr 9, 2022
    Configuration menu
    Copy the full SHA
    525438b View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#95751 - compiler-errors:ambig-int, r=jackh726

    Don't report numeric inference ambiguity when we have previous errors
    
    Fixes rust-lang#95648
    Dylan-DPC authored Apr 9, 2022
    Configuration menu
    Copy the full SHA
    d4e0ddf View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#95764 - c410-f3r:metavar-test, r=petrochenkov

    [macro_metavar_expr] Add tests to ensure the feature requirement
    
    These tests should have been added in the initial implementation they were unintentionally forgotten
    
    cc rust-lang#83527
    r? ````@petrochenkov````
    Dylan-DPC authored Apr 9, 2022
    Configuration menu
    Copy the full SHA
    0051301 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#95787 - yaahc:panic-doc-update-v2, r=dtolnay

    reword panic vs result section to remove recoverable vs unrecoverable framing
    
    Based on feedback from the Error Handling FAQ: rust-lang/project-error-handling#50 (comment)
    
    r? ````@dtolnay````
    Dylan-DPC authored Apr 9, 2022
    Configuration menu
    Copy the full SHA
    8d73922 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#95797 - nnethercote:rm-Delimited-all_tts, r…

    …=petrochenkov
    
    Remove explicit delimiter token trees from `Delimited`.
    
    They were introduced by the final commit in rust-lang#95159 and gave a
    performance win. But since the introduction of `MatcherLoc` they are no
    longer needed. This commit reverts that change, making the code a bit
    simpler.
    
    r? `@petrochenkov`
    Dylan-DPC authored Apr 9, 2022
    Configuration menu
    Copy the full SHA
    747bd16 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#95804 - GuillaumeGomez:empty-doc-comment-wi…

    …th-backline, r=notriddle
    
    rustdoc: Fix empty doc comment with backline ICE
    
    Fixes rust-lang#95800.
    
    r? ```@notriddle```
    Dylan-DPC authored Apr 9, 2022
    Configuration menu
    Copy the full SHA
    8f4680e View commit details
    Browse the repository at this point in the history