You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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_.
The text was updated successfully, but these errors were encountered:
jdm
added
the
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
label
Oct 20, 2015
Fixes#29184
This adds an error message for the use of the reserved `typeof` keyword, instead of reporting an ICE.
Also adds a `compile-fail` test.
I chose to add a `span_err` instead of removing to parser code, as to preserve the reservation of `typeof`.
If I compile
I get
So here is a bug report :)
The cause of panic is astconv, so one solution may be to change
span_bug
tospan_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 fromhir::Ty_
andast::Ty_
.The text was updated successfully, but these errors were encountered: