Skip to content

hir_typeck: pointer_kind todo!() ICE on ty::UnsafeBinder #525

Description

@SebTardif

Bug

FnCtxt::pointer_kind hits todo!("FIXME(unsafe_binder)") for ty::UnsafeBinder(_). Any pointer cast whose pointee (or unsizing tail) is an unsafe binder ICEs at compile time.

Location

compiler/rustc_hir_typeck/src/cast.rs:121

Impact

ICE (not graceful diagnostic) for unsafe_binder feature users on ptr/ptr or ptr/addr casts.

Origin

Lines Commit Date Author
121-122 9a1c5eb5b385 2024-12-21 Michael Goulet

Stub added when unsafe binder type was wired into typeck (9a1c5eb5b385).

Suggested fix

Return appropriate PointerKind (likely thin, or recurse into binder inner type) or emit a normal feature/diagnostic error via ErrorGuaranteed instead of todo!().

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemType systemI-crashUnexpected panic or crashP-mediumMedium impact: affects specific usage patternsbugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions