Skip to content

Commit 7948cab

Browse files
committed
---
yaml --- r: 2753 b: refs/heads/master c: c9a8bde h: refs/heads/master i: 2751: b0c1ac1 v: v3
1 parent fd727a4 commit 7948cab

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 776977b755947dbcb67b439fb7c3779a5cb6766e
2+
refs/heads/master: c9a8bdee2f777671a30f93339016fae044b1a081

trunk/src/comp/middle/typeck.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,6 +1570,11 @@ mod writeback {
15701570
}
15711571
}
15721572

1573+
if (ty::type_contains_vars(fcx.ccx.tcx, local_ty)) {
1574+
fcx.ccx.tcx.sess.span_err(sp,
1575+
"Ambiguous type " + ty_to_str(fcx.ccx.tcx, local_ty)
1576+
+ "\n(Try adding more type annotations.)");
1577+
}
15731578
write::ty_only(fcx.ccx.tcx, local.ann.id, local_ty);
15741579
}
15751580

0 commit comments

Comments
 (0)