Skip to content

ICE: Autoderef but type not derefable on fmt!("%?", None) #5062

Closed
@ben0x539

Description

@ben0x539

This is probably bad code because there's no way for the compiler to guess the complete type of None, but maybe it could be an explicit failure.

foo.rs:1:17: 1:21 error: internal compiler error: Autoderef but type not derefable: [type error]
foo.rs:1 fn main() { fmt!("%?", None); }
                          ^~~~
note: in expansion of fmt!
foo.rs:1:12: 1:29 note: expansion site

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions