Skip to content

ICE: constant expression should not reach expr::trans_def #28104

Closed
@FreeFull

Description

@FreeFull

Code that reproduces the ICE:

fn main() {
    std::u8::MAX;
}
<anon>:2:5: 2:18 warning: path statement with no effect, #[warn(path_statements)] on by default
<anon>:2     std::u8::MAX;
             ^~~~~~~~~~~~~
<anon>:2:5: 2:17 error: internal compiler error: constant expression should not reach expr::trans_def
<anon>:2     std::u8::MAX;
             ^~~~~~~~~~~~
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/diagnostic.rs:176

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