Skip to content
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

Emit warning on empty proxy type list #24

Closed
LukasKalbertodt opened this issue Jul 29, 2018 · 3 comments
Closed

Emit warning on empty proxy type list #24

LukasKalbertodt opened this issue Jul 29, 2018 · 3 comments
Labels
E-easy Probably fairly easy to fix/solve/implement E-mentor This issue is mentored enhancement

Comments

@LukasKalbertodt
Copy link
Member

LukasKalbertodt commented Jul 29, 2018

The attribute #[auto_impl()] should lead to a warning on nightly. Sadly, we cannot emit warnings on stable (since the proc_macro_diagnostic API is still unstable).


I can mentor anyone interested in tackling this issue :)
Just ping me (via email, this issue, or in any other way)

Instructions: Two things need to be done:

  • First, we need to extend a few things in diag.rs. There, we have a few traits that abstract over nightly/stable diagnostic. Since, as said above, proc_macro_diagnostic is still unstable, we report errors on stable via a hack. Thus you'll find a few #[cfg(feature = "nightly")] attributes there. We need to add a warn() method to SpanExt first. With the nightly feature, we should simply return a proc_macro::Diagnostic. On stable... good question. We probably want to modify our own Diagnostic type so that it can also "be a warning". But if it's a warning, the emit() will just don't do anything.

  • With that out of the way, we can finally tackle the core of this issue: emit the warning. I think the easiest way to do that is to add some code to parse_types() in proxy.rs.

If anything is unclear, just go ahead and ask!

@LukasKalbertodt LukasKalbertodt added this to the v0.3 milestone Jul 29, 2018
@LukasKalbertodt LukasKalbertodt added enhancement E-mentor This issue is mentored E-easy Probably fairly easy to fix/solve/implement labels Aug 30, 2018
@LukasKalbertodt LukasKalbertodt removed this from the v0.3 milestone Oct 2, 2018
@felipehfs
Copy link

Hello, I'm a junior developer in Brazil and I want to contribute but I don't know how to get started.

@felipehfs
Copy link

My email is felipehfsouza@gmail.com if you want contact me.

@LukasKalbertodt
Copy link
Member Author

@felipehfs Great! I wrote you a mail :)

@KodrAus KodrAus closed this as completed Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Probably fairly easy to fix/solve/implement E-mentor This issue is mentored enhancement
Projects
None yet
Development

No branches or pull requests

3 participants