mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 08:05:12 +00:00
Better error message instead of bare "fail" in infer
This commit is contained in:
parent
133fdc1148
commit
f0565be49a
@ -664,10 +664,10 @@ impl unify_methods for infer_ctxt {
|
||||
vb: vals_and_bindings<V, T>, vid: V)
|
||||
-> node<V, T> {
|
||||
|
||||
alt vb.vals.find(vid.to_uint()) {
|
||||
let vid_u = vid.to_uint();
|
||||
alt vb.vals.find(vid_u) {
|
||||
none {
|
||||
#error["failed lookup in infcx.get()"];
|
||||
fail;
|
||||
self.tcx.sess.bug(#fmt["failed lookup of vid `%u`", vid_u]);
|
||||
}
|
||||
some(var_val) {
|
||||
alt var_val {
|
||||
|
Loading…
Reference in New Issue
Block a user