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

Make useless_ptr_null_checks smarter about some std functions #114494

Merged
merged 4 commits into from
Sep 16, 2023

Commits on Aug 5, 2023

  1. Add #[rustc_never_returns_null_ptr]

    And look for it in the useless_ptr_null_checks lint
    est31 committed Aug 5, 2023
    Configuration menu
    Copy the full SHA
    8cfa4fe View commit details
    Browse the repository at this point in the history
  2. Add #[rustc_never_returns_null_ptr] to std functions

    Add the attribute to standard library functions that
    are guaranteed to never return null pointers, as their
    originating data wouldn't allow it.
    est31 committed Aug 5, 2023
    Configuration menu
    Copy the full SHA
    33970db View commit details
    Browse the repository at this point in the history
  3. Remove ptr_from_mut diagnostic item

    It was added by rust-lang#113657 for its purposes.
    Now it is not used any more, remove it,
    as we use the attr now.
    est31 committed Aug 5, 2023
    Configuration menu
    Copy the full SHA
    8faac74 View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2023

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