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:11: 2:15 error: attempted access of field `x` on type `&'static str`, but no field with that name was found
main.rs:2 let a = "".x[0];
^~~~
error: internal compiler error: no type for node 14: expr 0 (id=14) in fcx 0x47ec378
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', C:\bot\slave\nightly-dist-rustc-win-64\build\src\libsyntax\diagnostic.rs:182
If the type of a node cannot be determined due to a previous type error, a `no type for node` ICE occurs. This commit makes it return `ty_err` instead in such a case.
Fixes#20401.
Fixes#20506.
Fixes#20614.
Fixes#20752.
Fixes#20829.
Fixes#20846.
Fixes#20885.
Fixes#20886.
Fixes#20952.
Fixes#20970.
The following code results in ICE:
The error happens whenever 'x' is a unknown field or method; using a slice instead of an index also results in ICE.
The text was updated successfully, but these errors were encountered: