Skip to content

Commit 476817b

Browse files
committed
---
yaml --- r: 188331 b: refs/heads/master c: f9bbef7 h: refs/heads/master i: 188329: f54080f 188327: 68983dc v: v3
1 parent 3ecb174 commit 476817b

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: f1ea2b3094b1c28e64af30e187e31aa82f5ff004
2+
refs/heads/master: f9bbef7f448ba843052eb88733c79aa36c35d5ab
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
55
refs/heads/try: 649d35e4d830b27806705dc5352c86ab6d6fd1a1

trunk/src/librustc_typeck/astconv.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,17 +1233,18 @@ pub fn finish_resolving_def_to_ty<'tcx>(this: &AstConv<'tcx>,
12331233
if segments.is_empty() {
12341234
opt_self_ty.expect("missing T in <T>::a::b::c")
12351235
} else {
1236-
tcx.sess.span_bug(span,
1237-
&format!("found module name used as a type: {}",
1238-
tcx.map.node_to_string(id.node)));
1236+
span_err!(tcx.sess, span, E0247, "found module name used as a type: {}",
1237+
tcx.map.node_to_string(id.node));
1238+
return this.tcx().types.err;
12391239
}
12401240
}
12411241
def::DefPrimTy(prim_ty) => {
12421242
prim_ty_to_ty(tcx, segments, prim_ty)
12431243
}
12441244
_ => {
1245-
span_fatal!(tcx.sess, span, E0248,
1246-
"found value name used as a type: {:?}", *def);
1245+
span_err!(tcx.sess, span, E0248,
1246+
"found value name used as a type: {:?}", *def);
1247+
return this.tcx().types.err;
12471248
}
12481249
};
12491250

@@ -1278,10 +1279,11 @@ pub fn ast_ty_to_ty<'tcx>(this: &AstConv<'tcx>,
12781279
match ast_ty_to_ty_cache.get(&ast_ty.id) {
12791280
Some(&ty::atttce_resolved(ty)) => return ty,
12801281
Some(&ty::atttce_unresolved) => {
1281-
span_fatal!(tcx.sess, ast_ty.span, E0246,
1282+
span_err!(tcx.sess, ast_ty.span, E0246,
12821283
"illegal recursive type; insert an enum \
12831284
or struct in the cycle, if this is \
12841285
desired");
1286+
return this.tcx().types.err;
12851287
}
12861288
None => { /* go on */ }
12871289
}

0 commit comments

Comments
 (0)