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

Ignore vtables in {Rc, Arc, Weak}::ptr_eq #80505

Closed
wants to merge 1 commit into from

Commits on Jan 24, 2021

  1. Ignore vtables in {Rc, Arc, Weak}::ptr_eq

    We sometimes generate duplicate vtables depending on the number of
    codegen units (rust-lang#46139), so we need to exclude the vtable part when
    comparing fat pointers.
    
    This is safe for the case of Rc, Arc, and Weak because these always
    point to an entire allocation.  These methods can’t be used to
    compare, e.g., a struct with one of its fields, a slice with one of
    its subslices, or consecutive ZST fields.
    
    Fixes rust-lang#63021.
    
    Signed-off-by: Anders Kaseorg <andersk@mit.edu>
    andersk committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    bda12a6 View commit details
    Browse the repository at this point in the history