Skip to content

ICE: ty_is_local invoked on unexpected type: [type error] implementing trait for undeclared type #30589

Closed
@Ms2ger

Description

@Ms2ger
use std::fmt;

impl fmt::Display for DecoderError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "Missing data: {}", self.0)
    }
}
fn main() {
}
/tmp/y:3:23: 3:35 error: use of undeclared type name `DecoderError` [E0412]
/tmp/y:3 impl fmt::Display for DecoderError {
                               ^~~~~~~~~~~~
/tmp/y:3:23: 3:35 help: run `rustc --explain E0412` to see a detailed explanation
error: internal compiler error: ty_is_local invoked on unexpected type: [type error]
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', ../src/libsyntax/errors/mod.rs:230

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-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