Skip to content

Improve error when compiling a derive macro with -Z sanitizer #63986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
software-opal opened this issue Aug 28, 2019 · 0 comments
Open

Improve error when compiling a derive macro with -Z sanitizer #63986

software-opal opened this issue Aug 28, 2019 · 0 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-driver Area: rustc_driver that ties everything together into the `rustc` compiler A-sanitizers Area: Sanitizers for correctness and code quality C-enhancement Category: An issue proposing an enhancement or a PR with one. requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@software-opal
Copy link

I'm trying to build some code with the address sanitiser on; and I run into this error:

Compiling failure_derive v0.1.5
error: Only executables, staticlibs, cdylibs, dylibs and rlibs can be compiled with `-Z sanitizer`
error: aborting due to previous error
error: Could not compile `failure_derive`.
error: build failed

After some googling the solution appears to be(from #48199) to use --target=.... I was wondering if the message could be improved to something like:

Compiling failure_derive v0.1.5
error: Only executables, staticlibs, cdylibs, dylibs and rlibs can be compiled with `-Z sanitizer`
hint: Try running the command again, and specifying a target triple; e.g. `--target=x86_64-unknown-linux-gnu`
error: aborting due to previous error
error: Could not compile `failure_derive`.
error: build failed
@Centril Centril added the requires-nightly This issue requires a nightly compiler in some way. label Aug 29, 2019
@jonas-schievink jonas-schievink added A-diagnostics Area: Messages for errors, warnings, and lints A-driver Area: rustc_driver that ties everything together into the `rustc` compiler C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-sanitizers Area: Sanitizers for correctness and code quality labels Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-driver Area: rustc_driver that ties everything together into the `rustc` compiler A-sanitizers Area: Sanitizers for correctness and code quality C-enhancement Category: An issue proposing an enhancement or a PR with one. requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants