diff options
| author | Dylan McKay <dylanmckay34@gmail.com> | 2015-08-15 21:06:06 +1200 |
|---|---|---|
| committer | Dylan McKay <dylanmckay34@gmail.com> | 2015-08-15 21:06:06 +1200 |
| commit | ea7768c2dd8089cc3c3dc1e27158cf1bed277308 (patch) | |
| tree | fa2c70b65d7e6a75fe5e935fe73e62072c349f4a | |
| parent | 30ec363c76f01aeff163b51096fa9582614b52ad (diff) | |
| download | rust-ea7768c2dd8089cc3c3dc1e27158cf1bed277308.tar.gz rust-ea7768c2dd8089cc3c3dc1e27158cf1bed277308.zip | |
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.
| -rw-r--r-- | src/librustc_trans/trans/context.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_trans/trans/context.rs b/src/librustc_trans/trans/context.rs index bd13667ac08..7f383f568a0 100644 --- a/src/librustc_trans/trans/context.rs +++ b/src/librustc_trans/trans/context.rs @@ -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) } } |
