Skip to content

Add allow omit rule = #410

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
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

A4-Tacks
Copy link
Contributor

This PR makes = ... optional for easy completion

rule x() -> cannot trigger completion, rule x() -> = can

@kevinmehall
Copy link
Owner

By "completion" do you mean allowing the macro expansion to generate enough output so that rust-analyzer can provide suggestions for the return type?

This would allow mistakes to be successfully compiled. Instead of fully allowing this, would it work to expand it to something like rule x() -> ty = { compile_error!("missing rule body") } such that rustc won't compile it, but rust-analyzer can still see the ty you've started typing?

@A4-Tacks
Copy link
Contributor Author

Good idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants