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

ptr: introduce len() method on raw slices #71082

Merged
merged 5 commits into from
Apr 15, 2020

Commits on Apr 14, 2020

  1. rustc: add lang items "const_slice_ptr" and "mut_slice_ptr"

    Add lang items for methods on raw slices.
    neocturne committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    10ae85f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0c17b3f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    43612e2 View commit details
    Browse the repository at this point in the history
  4. ptr: introduce len() method on raw slices

    It is already possible to extract the pointer part of a raw slice by a
    simple cast, but retrieving the length is not possible without relying
    on the representation of the raw slice when it is not valid to convert
    the raw slice into a slice reference (i.e. the pointer is null or
    unaligned).
    
    Introduce a len() method on raw slices to add this missing feature.
    neocturne committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    2a29f8f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    dfd6844 View commit details
    Browse the repository at this point in the history