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
use rustc;
import rustc::middle::ty;
fn main() {
let _t: ty::sty = ty::ty_nil;
}
It fails to compile with this error:
infer_err.rs:4:22: 4:32 error: mismatched types: expected `rustc::middle::ty::sty` but found `rustsyntax::ast::ty_` (enum rustc::middle::ty::sty vs enum rustsyntax::ast::ty_)
infer_err.rs:4 let _t: ty::sty = ty::ty_nil;
^~~~~~~~~~
This happens for other ty::sty variants such as ty::ty_nil and ty::ty_bool, but not for ty::ty_type and possibly some others. It's also worth noting that this might only happen outside the rustc crate, as I could not reproduce this error by doing similar things inside rustc.