Improve 'unknown instrinsic' error message
If you had previously tried to get the ValueRef associated with an intrinsic that hadn't been described in `trans::context::declare_intrinsic()`, the compile would panic with an empty message. Now we print out details about the error in the panic message.
This commit is contained in:
parent
30ec363c76
commit
ea7768c2dd
@ -566,7 +566,7 @@ impl<'b, 'tcx> CrateContext<'b, 'tcx> {
|
||||
}
|
||||
match declare_intrinsic(self, key) {
|
||||
Some(v) => return v,
|
||||
None => panic!()
|
||||
None => panic!("unknown intrinsic '{}'", key)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user