softdevteam / ykrustc

Yorick Meta-tracer
Other
6 stars 4 forks source link

Better error messages for bogus #[interp_step] functions. #143

Closed vext01 closed 4 years ago

vext01 commented 4 years ago

Instead of just bombing out without any useful location information, we now point out the troublesome function definition.

Also make the errors fatal. Fixes a vector out of bounds problem when the trace-related code tries to find the trace IO.

E.g.:

error: The #[interp_step] function must accept only one argument
  --> /home/vext01/research/yorick/ykrustc/src/test/compile-fail/yk/interp-step.rs:8:1
   |
LL | fn f1() {}
   | ^^^^^^^
ptersilie commented 4 years ago

bors r+

bors[bot] commented 4 years ago

Build failed:

vext01 commented 4 years ago

OK to squash?

ptersilie commented 4 years ago

Yup.

vext01 commented 4 years ago

splat.

ptersilie commented 4 years ago

bors r+

bors[bot] commented 4 years ago

Build succeeded: