Skip to content

type_name ICE #61894

Closed
Closed
@quininer

Description

@quininer
struct Bar<M>(M);

impl<M> Bar<M> {
    fn foo(&self) {
        fn f() {}
        fn type_name_of<T>(_: T) -> &'static str {
            unsafe { type_name::<T>() }
        }
        type_name_of(f);
    }
}

https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=c27b41def12af0276d04e418f0e50b07

I believe this happened after #60166.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions