Skip to content

Commit ea7768c

Browse files
author
Dylan McKay
committed
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.
1 parent 30ec363 commit ea7768c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_trans/trans/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ impl<'b, 'tcx> CrateContext<'b, 'tcx> {
566566
}
567567
match declare_intrinsic(self, key) {
568568
Some(v) => return v,
569-
None => panic!()
569+
None => panic!("unknown intrinsic '{}'", key)
570570
}
571571
}
572572

0 commit comments

Comments
 (0)