mystor / rust-cpp

Embed C++ directly inside your rust code!
Apache License 2.0
798 stars 44 forks source link

Better error #34

Closed ogoffart closed 6 years ago

ogoffart commented 6 years ago

Before this patch, cpp_build would panic with error message which is just failed to parse cpp! macrowhich is not really helping much as we don't even know what cpp! macro was wrong. So add the location of the cpp! macro to the message.

Not 100% perfect, but cover most part of the file and avoid having an error to a location which is completely off when the compiler points to part of the generated file which is not directly in the programmer's .rs file.