let path = &trait_ref.path;
match ::lookup_full_def(this.tcx(), path.span, trait_ref.ref_id) {
def::DefTrait(trait_def_id) => trait_def_id,
+ def::DefErr => {
+ this.tcx().sess.fatal("cannot continue compilation due to previous error");
+ }
_ => {
span_fatal!(this.tcx().sess, path.span, E0245, "`{}` is not a trait",
path);
def::DefPrimTy(prim_ty) => {
prim_ty_to_ty(tcx, base_segments, prim_ty)
}
+ def::DefErr => {
+ return this.tcx().types.err;
+ }
_ => {
let id_node = tcx.map.as_local_node_id(def.def_id()).unwrap();
span_err!(tcx.sess, span, E0248,