Skip to content

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!

@A4-Tacks
Copy link
Contributor Author

r? @kevinmehall

@kevinmehall kevinmehall merged commit 4c2c42c into kevinmehall:master Aug 3, 2025
2 checks passed
@kevinmehall
Copy link
Owner

Thanks!

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