-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Closed
Labels
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Description
If I compile
fn main() {
let x: typeof(92) = 92;
}I get
main.rs:2:12: 2:22 error: internal compiler error: typeof is reserved but unimplemented
main.rs:2 let x: typeof(92) = 92;
^~~~~~~~~~
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
So here is a bug report :)
The cause of panic is astconv, so one solution may be to change span_bug to span_err!
But the root case is the parser, which accepts typeof, so one over solution would be to remove the case from the parser.
I don't now whether typeof variants should be removed from hir::Ty_ and ast::Ty_.
Metadata
Metadata
Assignees
Labels
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️