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

Use NonNull in slice::Iter and slice::IterMut. #67588

Merged
merged 1 commit into from
Dec 28, 2019

Commits on Dec 26, 2019

  1. Use NonNull in slice::Iter and slice::IterMut.

    `ptr` of `slice::Iter` and `slice::IterMut` can never be null, but this
    fact wasn't exploited for layout optimizations. By changing `ptr` from
    `*<mutability> T` to `NonNull<T>`, the compiler can now optimize layout
    of `Option<Iter<'a, T>>`.
    Kixunil committed Dec 26, 2019
    Configuration menu
    Copy the full SHA
    2c796ee View commit details
    Browse the repository at this point in the history